> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/api/api-reference/b2b-manager/parsers-and-generators.md).

# Parsers & Generators

Stateless data transformation processors that convert between raw formats (XML, CSV, EDI) and structured JSON. Parsers accept raw data and return JSON records; generators accept JSON and produce formatted output.

These are one-shot transformation calls — they do not create or modify any resources. Use them to test parsing rules, preview file definitions, or transform data outside of a flow. The filter and Handlebars processors test a step's filter rules or templates the same way.

### Processor descriptor schema

## The ProcessorDescriptor object

```json
{"openapi":"3.2.0","info":{"title":"Parsers & Generators","version":"1.0.0"},"components":{"schemas":{"ProcessorDescriptor":{"type":"object","required":["name","label","description","dataMediaType","resultMediaType","ruleMediaType"],"description":"Metadata describing a single processor type.","properties":{"name":{"type":"string","description":"Processor key (matches the enclosing object key)."},"label":{"type":"string","description":"Human-readable label shown in the UI."},"description":{"type":"string","description":"Short description of the processor's behavior."},"ruleMediaType":{"type":"string","description":"Media type of the processor's rule/template field. Typical values\ninclude `text`, `json`, `javascript`."},"dataMediaType":{"type":"string","description":"Media type the processor expects for the input data."},"resultMediaType":{"type":"string","description":"Media type the processor emits as its result."},"ruleJsonSchema":{"type":"object","additionalProperties":true,"description":"JSON Schema describing the processor's rule structure. Only\npresent on processors with a formal schema (e.g. exportDataConverter)."},"helperFunctions":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of helper function names to usage templates. Only present\non the handlebars processor."}}}}}}
```

## List available flow processor types

> Returns the catalog of processor types the flow engine supports — filter,\
> transform, handlebars, javascript, mapper, CSV/XML parser / generator,\
> branch filter, merge, etc. Each entry carries a label, description, and\
> the input/output media types the processor accepts. The response is\
> keyed by processor name (not an array).

```json
{"openapi":"3.2.0","info":{"title":"Parsers & Generators","version":"1.0.0"},"tags":[{"name":"Parsers & Generators","description":"Stateless data transformation processors that convert between raw formats\n(XML, CSV, EDI) and structured JSON. Parsers accept raw data and return\nJSON records; generators accept JSON and produce formatted output.\n\nThese are one-shot transformation calls — they do not create or modify\nany resources. Use them to test parsing rules, preview file definitions,\nor transform data outside of a flow. The filter and Handlebars processors\ntest a step's filter rules or templates the same way.\n\n## Processor descriptor schema\n\n{% openapi-schemas spec=\"processor\" schemas=\"ProcessorDescriptor\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"ProcessorsResponse":{"type":"object","description":"Processor catalog keyed by processor name. Each value describes the\nprocessor's label, purpose, and input/output media types.","additionalProperties":{"$ref":"#/components/schemas/ProcessorDescriptor"}},"ProcessorDescriptor":{"type":"object","required":["name","label","description","dataMediaType","resultMediaType","ruleMediaType"],"description":"Metadata describing a single processor type.","properties":{"name":{"type":"string","description":"Processor key (matches the enclosing object key)."},"label":{"type":"string","description":"Human-readable label shown in the UI."},"description":{"type":"string","description":"Short description of the processor's behavior."},"ruleMediaType":{"type":"string","description":"Media type of the processor's rule/template field. Typical values\ninclude `text`, `json`, `javascript`."},"dataMediaType":{"type":"string","description":"Media type the processor expects for the input data."},"resultMediaType":{"type":"string","description":"Media type the processor emits as its result."},"ruleJsonSchema":{"type":"object","additionalProperties":true,"description":"JSON Schema describing the processor's rule structure. Only\npresent on processors with a formal schema (e.g. exportDataConverter)."},"helperFunctions":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of helper function names to usage templates. Only present\non the handlebars processor."}}}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/processors":{"get":{"operationId":"listProcessorTypes","tags":["Parsers & Generators"],"summary":"List available flow processor types","description":"Returns the catalog of processor types the flow engine supports — filter,\ntransform, handlebars, javascript, mapper, CSV/XML parser / generator,\nbranch filter, merge, etc. Each entry carries a label, description, and\nthe input/output media types the processor accepts. The response is\nkeyed by processor name (not an array).","responses":{"200":{"description":"Processor catalog, keyed by processor name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessorsResponse"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"}}}}}}
```

## Convert XML to JSON

> Parses XML data into JSON records using the specified parsing rules\
> and resource path.\
> \
> \*\*Resource path format\*\* — Use XPath-style slash-separated paths\
> (e.g. \`/root/item\`). Dot-separated paths (e.g. \`root.item\`) do not\
> work.\
> \
> \*\*Legacy vs modern output\*\* — Without \`doc.parsers\` configured, or\
> with \`V0\_json: true\`, the parser produces a legacy format where\
> element text appears as \`\[{"\_": "value"}]\` arrays and attributes\
> appear under a \`$\` key. Setting \`V0\_json: false\` produces clean\
> key-value pairs and flattens attributes into the record.\
> \
> When \`groupByFields\` is used the response shape changes: \`data\`\
> becomes an array of arrays and \`dataRecordTraceKeys\` /\
> \`traceKeysDuplicate\` are omitted.\
> \
> Invalid XML returns a 422 with code \`cannot\_parse\_xml\`.\
> Namespaced XPath expressions (e.g. \`ns:element\`) return a 422\
> with code \`invalid\_xpath\`.

```json
{"openapi":"3.2.0","info":{"title":"Parsers & Generators","version":"1.0.0"},"tags":[{"name":"Parsers & Generators","description":"Stateless data transformation processors that convert between raw formats\n(XML, CSV, EDI) and structured JSON. Parsers accept raw data and return\nJSON records; generators accept JSON and produce formatted output.\n\nThese are one-shot transformation calls — they do not create or modify\nany resources. Use them to test parsing rules, preview file definitions,\nor transform data outside of a flow. The filter and Handlebars processors\ntest a step's filter rules or templates the same way.\n\n## Processor descriptor schema\n\n{% openapi-schemas spec=\"processor\" schemas=\"ProcessorDescriptor\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"ParserResponse":{"type":"object","description":"Response from a parser processor (`csvParser`, `xmlParser`).\n\nWhen `groupByFields` is used in the request, the `dataRecordTraceKeys`\nand `traceKeysDuplicate` fields are omitted from the response and `data`\nbecomes an array of arrays (each inner array is one group of records).","properties":{"mediaType":{"type":"string","description":"Always `json` for parser processors.","enum":["json"]},"data":{"description":"Parsed records. Normally an array of objects. When `groupByFields`\nis used, becomes an array of arrays (grouped records).","oneOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"array","items":{"type":"array","items":{"type":"object","additionalProperties":true}}}]},"duration":{"type":"integer","description":"Processing time in milliseconds."},"dataRecordTraceKeys":{"type":"array","items":{"type":["string","null"]},"description":"Trace keys for each output record (nullable entries). Omitted\nwhen `groupByFields` is used."},"traceKeysDuplicate":{"type":"boolean","description":"Whether any duplicate trace keys were detected. Omitted when\n`groupByFields` is used."}}}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/processors/xmlParser":{"post":{"operationId":"parseXml","tags":["Parsers & Generators"],"summary":"Convert XML to JSON","description":"Parses XML data into JSON records using the specified parsing rules\nand resource path.\n\n**Resource path format** — Use XPath-style slash-separated paths\n(e.g. `/root/item`). Dot-separated paths (e.g. `root.item`) do not\nwork.\n\n**Legacy vs modern output** — Without `doc.parsers` configured, or\nwith `V0_json: true`, the parser produces a legacy format where\nelement text appears as `[{\"_\": \"value\"}]` arrays and attributes\nappear under a `$` key. Setting `V0_json: false` produces clean\nkey-value pairs and flattens attributes into the record.\n\nWhen `groupByFields` is used the response shape changes: `data`\nbecomes an array of arrays and `dataRecordTraceKeys` /\n`traceKeysDuplicate` are omitted.\n\nInvalid XML returns a 422 with code `cannot_parse_xml`.\nNamespaced XPath expressions (e.g. `ns:element`) return a 422\nwith code `invalid_xpath`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"The XML data to parse (as a string)."},"rules":{"type":"object","description":"Parsing rules. At minimum, provide `resourcePath` to select\nwhich XML elements become records. Add `doc.parsers` to\ncontrol the output format.","properties":{"resourcePath":{"type":"string","description":"Slash-separated path to the repeating element in the XML\n(e.g. `/root/items/item`). Each matching element becomes\none output record."},"groupByFields":{"type":"array","items":{"type":"string"},"description":"Group parsed records by these field names. Changes the\nresponse `data` to an array of arrays and omits\n`dataRecordTraceKeys` and `traceKeysDuplicate`."},"sortByFields":{"type":"array","items":{"type":"string"}},"doc":{"type":"object","properties":{"fileParser":{"type":"boolean"},"parsers":{"type":"array","description":"Array of parser configurations. Typically contains a\nsingle XML parser entry.","items":{"type":"object","properties":{"type":{"type":"string","enum":["xml"]},"version":{"type":"integer"},"rules":{"type":"object","properties":{"V0_json":{"type":"boolean","description":"When `false`, produces clean key-value output\nand flattens XML attributes into the record.\nWhen `true` (default), uses legacy format with\n`_` and `$` keys."},"trimSpaces":{"type":"boolean","description":"Trim leading/trailing whitespace from text nodes."},"stripNewLineChars":{"type":"boolean","description":"Remove newline characters from text nodes."},"attributePrefix":{"type":"string","description":"Prefix prepended to XML attribute names in the\nJSON output (e.g. `@` produces `@id`). Only\nactive when `V0_json` is `false`."},"textNodeName":{"type":"string","description":"Property name for text content in mixed-content\nelements. Defaults to `&txt`. Only active when\n`V0_json` is `false`."},"listNodes":{"type":"array","items":{"type":"string"},"description":"Paths of elements that always parse as arrays. An\nelement that occurs once otherwise parses as an\nobject, and as an array only when it repeats. Each\nentry is the element's full path from the record\nelement selected by `resourcePath` (from the\ndocument root when `resourcePath` is unset), with\nan optional leading slash; `//` descendant paths do\nnot match. Only active when `V0_json` is `false`."},"includeNodes":{"type":"array","items":{"type":"string"},"description":"Only include these element names in the output.\nAll other elements are dropped. Only active when\n`V0_json` is `false`."},"excludeNodes":{"type":"array","items":{"type":"string"},"description":"Exclude these element names from the output. Only\nactive when `V0_json` is `false`."},"mixedNodes":{"type":"array","items":{"type":"string"},"description":"Element names that contain mixed content (text\ninterleaved with child elements). Text is\nextracted into the `textNodeName` property. Only\nactive when `V0_json` is `false`."}}}}}}}}}}}}}}},"responses":{"200":{"description":"Parsed JSON records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParserResponse"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"description":"Invalid XPath expression or processing rule error.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_xpath","cannot_parse_xml"]},"message":{"type":"string"},"source":{"type":"string"},"resolved":{"type":"boolean"},"occurredAt":{"type":"integer"},"path":{"type":"string"}}}}}}}}}}}
```

## Convert CSV to JSON

> Parses CSV data into JSON records using the specified delimiter and\
> formatting rules.\
> \
> Both \`data\` and \`rules\` are technically optional — omitting either\
> returns an empty result rather than an error. When \`hasHeaderRow\` is\
> false, columns are named \`Column0\`, \`Column1\`, etc. When\
> \`includeEmptyValues\` is true, missing values become JSON \`null\`\
> instead of being omitted from the record.\
> \
> When \`groupByFields\` is used the response shape changes: \`data\`\
> becomes an array of arrays (grouped records) and the\
> \`dataRecordTraceKeys\` / \`traceKeysDuplicate\` fields are omitted.\
> This is a stateless transformation. All values are returned as\
> strings, even numeric CSV columns.

```json
{"openapi":"3.2.0","info":{"title":"Parsers & Generators","version":"1.0.0"},"tags":[{"name":"Parsers & Generators","description":"Stateless data transformation processors that convert between raw formats\n(XML, CSV, EDI) and structured JSON. Parsers accept raw data and return\nJSON records; generators accept JSON and produce formatted output.\n\nThese are one-shot transformation calls — they do not create or modify\nany resources. Use them to test parsing rules, preview file definitions,\nor transform data outside of a flow. The filter and Handlebars processors\ntest a step's filter rules or templates the same way.\n\n## Processor descriptor schema\n\n{% openapi-schemas spec=\"processor\" schemas=\"ProcessorDescriptor\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"ParserResponse":{"type":"object","description":"Response from a parser processor (`csvParser`, `xmlParser`).\n\nWhen `groupByFields` is used in the request, the `dataRecordTraceKeys`\nand `traceKeysDuplicate` fields are omitted from the response and `data`\nbecomes an array of arrays (each inner array is one group of records).","properties":{"mediaType":{"type":"string","description":"Always `json` for parser processors.","enum":["json"]},"data":{"description":"Parsed records. Normally an array of objects. When `groupByFields`\nis used, becomes an array of arrays (grouped records).","oneOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"array","items":{"type":"array","items":{"type":"object","additionalProperties":true}}}]},"duration":{"type":"integer","description":"Processing time in milliseconds."},"dataRecordTraceKeys":{"type":"array","items":{"type":["string","null"]},"description":"Trace keys for each output record (nullable entries). Omitted\nwhen `groupByFields` is used."},"traceKeysDuplicate":{"type":"boolean","description":"Whether any duplicate trace keys were detected. Omitted when\n`groupByFields` is used."}}}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/processors/csvParser":{"post":{"operationId":"parseCsv","tags":["Parsers & Generators"],"summary":"Convert CSV to JSON","description":"Parses CSV data into JSON records using the specified delimiter and\nformatting rules.\n\nBoth `data` and `rules` are technically optional — omitting either\nreturns an empty result rather than an error. When `hasHeaderRow` is\nfalse, columns are named `Column0`, `Column1`, etc. When\n`includeEmptyValues` is true, missing values become JSON `null`\ninstead of being omitted from the record.\n\nWhen `groupByFields` is used the response shape changes: `data`\nbecomes an array of arrays (grouped records) and the\n`dataRecordTraceKeys` / `traceKeysDuplicate` fields are omitted.\nThis is a stateless transformation. All values are returned as\nstrings, even numeric CSV columns.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"The CSV data to parse."},"rules":{"type":"object","description":"Parsing rules controlling delimiters, headers, and grouping.","properties":{"columnDelimiter":{"type":"string","description":"Column delimiter character (e.g. `,`, `\\t`)."},"rowDelimiter":{"type":"string","description":"Row delimiter (e.g. `\\n`, `|`)."},"trimSpaces":{"type":"boolean","description":"When true, trims leading and trailing spaces from parsed values."},"hasHeaderRow":{"type":"boolean","description":"When true, the first row is treated as column headers. When false,\ncolumns are named Column0, Column1, etc."},"rowsPerRecord":{"type":"boolean"},"rowsToSkip":{"type":"integer","description":"Number of rows to skip before parsing begins."},"multipleRowsPerRecord":{"type":"boolean"},"keyColumns":{"type":"array","items":{"type":"string"},"description":"Group consecutive rows into multi-row records by\nthese column names. When a new value appears in a\nkey column, a new record group starts. Changes the\nresponse `data` to an array of arrays."},"disableQuoteAndStripEnclosingQuotes":{"type":"boolean","description":"Disables CSV quote handling and strips enclosing\nquotes from values."},"groupByFields":{"type":"array","items":{"type":"string"},"description":"Group parsed records by these field names. Changes the\nresponse `data` to an array of arrays and omits\n`dataRecordTraceKeys` and `traceKeysDuplicate`."},"sortByFields":{"type":"array","items":{"type":"string"}}}},"options":{"type":"object","properties":{"includeEmptyValues":{"type":"boolean","description":"When true, empty CSV values are returned as JSON `null`.\nWhen false (default), empty values are omitted from the\nrecord."}}}}}}}},"responses":{"200":{"description":"Parsed JSON records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParserResponse"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"}}}}}}
```

## Generate CSV from JSON

> Generates CSV output from JSON records using the specified delimiter\
> and formatting rules.\
> \
> The response always has \`mediaType: "text"\` and does not include\
> \`dataRecordTraceKeys\` or \`traceKeysDuplicate\`. This is a stateless\
> transformation.

```json
{"openapi":"3.2.0","info":{"title":"Parsers & Generators","version":"1.0.0"},"tags":[{"name":"Parsers & Generators","description":"Stateless data transformation processors that convert between raw formats\n(XML, CSV, EDI) and structured JSON. Parsers accept raw data and return\nJSON records; generators accept JSON and produce formatted output.\n\nThese are one-shot transformation calls — they do not create or modify\nany resources. Use them to test parsing rules, preview file definitions,\nor transform data outside of a flow. The filter and Handlebars processors\ntest a step's filter rules or templates the same way.\n\n## Processor descriptor schema\n\n{% openapi-schemas spec=\"processor\" schemas=\"ProcessorDescriptor\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"GeneratorResponse":{"type":"object","description":"Response from a generator processor (`csvDataGenerator`, `structuredFileGenerator`).","properties":{"mediaType":{"type":"string","description":"Always `text` for generator processors.","enum":["text"]},"data":{"type":"string","description":"Generated text output (CSV, EDI, or other structured format)."},"duration":{"type":"integer","description":"Processing time in milliseconds."}}}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/processors/csvDataGenerator":{"post":{"operationId":"generateCsv","tags":["Parsers & Generators"],"summary":"Generate CSV from JSON","description":"Generates CSV output from JSON records using the specified delimiter\nand formatting rules.\n\nThe response always has `mediaType: \"text\"` and does not include\n`dataRecordTraceKeys` or `traceKeysDuplicate`. This is a stateless\ntransformation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"description":"Records to convert to CSV. Accepts a flat array of objects\n(e.g. `[{\"a\":\"1\"}, {\"a\":\"2\"}]`) or an array of arrays for\nbatch processing (e.g. `[[{\"a\":\"1\"}], [{\"a\":\"2\"}]]`). Each\nobject's keys become column names when `includeHeader` is\ntrue.","oneOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"array","items":{"type":"array","items":{"type":"object","additionalProperties":true}}}]},"rules":{"type":"object","description":"Generation rules controlling delimiters, headers, and\nformatting.","properties":{"columnDelimiter":{"type":"string","description":"Column delimiter character (e.g. `,`, `\\t`)."},"rowDelimiter":{"type":"string","description":"Row delimiter character (default `\\n`). Appended after\neach row including the last unless\n`truncateLastRowDelimiter` is true."},"includeHeader":{"type":"boolean","description":"When true, includes a header row with column names in the output."},"truncateLastRowDelimiter":{"type":"boolean","description":"When true, omits the trailing row delimiter after the\nlast data row."},"replaceTabWithSpace":{"type":"boolean","description":"Replace tab characters in values with spaces."},"replaceNewlineWithSpace":{"type":"boolean","description":"Replace newline characters in values with spaces."},"wrapWithQuotes":{"type":"boolean","description":"Wrap every value (including headers) in double quotes."},"customHeaderRows":{"type":"array","items":{"type":"string"},"description":"Custom header lines prepended before the column header\nrow and data rows. Each string becomes one line in the\noutput."}}}}}}}},"responses":{"200":{"description":"Generated CSV data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratorResponse"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"}}}}}}
```

## Parse structured file (EDI) to JSON

> Parses EDI or other structured/delimited file data into JSON using\
> a file definition (parsing rules). Commonly used for X12 and EDIFACT\
> documents.\
> \
> The file definition must be provided inside a \`rules.fileDefinition\`\
> wrapper object, or referenced by ID via \`rules.\_fileDefinitionId\`.\
> This differs from the generator endpoint which places definition\
> fields directly in \`rules\`.\
> \
> The response includes a \`recordLevelErrors\` array not present on\
> other processor responses. This is a stateless transformation.\
> Provide the file definition inline via \`rules.fileDefinition\` or\
> reference an existing one via \`rules.\_fileDefinitionId\` (not both).\
> The generator endpoint places definition fields directly in \`rules\`\
> (no \`fileDefinition\` wrapper).\
> \
> \*\*Required file definition fields\*\* — \`name\`, \`version\` (string\
> \`"1"\` or \`"2"\`), \`format\` (\`delimited\`, \`delimited/x12\`,\
> \`delimited/edifact\`, or \`fixed\`), and the corresponding format\
> sub-object (\`delimited\` or \`fixed\`) with at least \`rowDelimiter\`\
> and \`colDelimiter\` (for delimited) or \`rowDelimiter\` and\
> \`paddingChar\` (for fixed). The \`rules\` property defines the\
> segment/element hierarchy.

```json
{"openapi":"3.2.0","info":{"title":"Parsers & Generators","version":"1.0.0"},"tags":[{"name":"Parsers & Generators","description":"Stateless data transformation processors that convert between raw formats\n(XML, CSV, EDI) and structured JSON. Parsers accept raw data and return\nJSON records; generators accept JSON and produce formatted output.\n\nThese are one-shot transformation calls — they do not create or modify\nany resources. Use them to test parsing rules, preview file definitions,\nor transform data outside of a flow. The filter and Handlebars processors\ntest a step's filter rules or templates the same way.\n\n## Processor descriptor schema\n\n{% openapi-schemas spec=\"processor\" schemas=\"ProcessorDescriptor\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"StructuredFileParserResponse":{"type":"object","description":"Response from the `structuredFileParser` processor.","properties":{"mediaType":{"type":"string","description":"Always `json` for the structured file parser.","enum":["json"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Parsed records from the structured file."},"recordLevelErrors":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Per-record errors encountered during parsing (e.g. missing required\nsegments or element validation failures)."},"duration":{"type":"integer","description":"Processing time in milliseconds."},"dataRecordTraceKeys":{"type":"array","items":{"type":["string","null"]},"description":"Trace keys for each output record (nullable entries)."},"traceKeysDuplicate":{"type":"boolean","description":"When true, duplicate trace keys were detected in the output records."}}}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/processors/structuredFileParser":{"post":{"operationId":"parseStructuredFile","tags":["Parsers & Generators"],"summary":"Parse structured file (EDI) to JSON","description":"Parses EDI or other structured/delimited file data into JSON using\na file definition (parsing rules). Commonly used for X12 and EDIFACT\ndocuments.\n\nThe file definition must be provided inside a `rules.fileDefinition`\nwrapper object, or referenced by ID via `rules._fileDefinitionId`.\nThis differs from the generator endpoint which places definition\nfields directly in `rules`.\n\nThe response includes a `recordLevelErrors` array not present on\nother processor responses. This is a stateless transformation.\nProvide the file definition inline via `rules.fileDefinition` or\nreference an existing one via `rules._fileDefinitionId` (not both).\nThe generator endpoint places definition fields directly in `rules`\n(no `fileDefinition` wrapper).\n\n**Required file definition fields** — `name`, `version` (string\n`\"1\"` or `\"2\"`), `format` (`delimited`, `delimited/x12`,\n`delimited/edifact`, or `fixed`), and the corresponding format\nsub-object (`delimited` or `fixed`) with at least `rowDelimiter`\nand `colDelimiter` (for delimited) or `rowDelimiter` and\n`paddingChar` (for fixed). The `rules` property defines the\nsegment/element hierarchy.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["data","rules"],"properties":{"data":{"type":"string","description":"The raw structured file content to parse."},"rules":{"type":"object","description":"Provide either a `fileDefinition` object with the full\ndefinition inline, or a `_fileDefinitionId` to reference\nan existing file definition resource.","properties":{"fileDefinition":{"type":"object","description":"Inline file definition. Must include `name`, `version`,\n`format`, the format-specific sub-object, and `rules`.","properties":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string","enum":["1","2"]},"format":{"type":"string","description":"File format type.","enum":["delimited","delimited/x12","delimited/edifact","fixed"]},"delimited":{"type":"object","description":"Required when `format` starts with `delimited`.","properties":{"rowSuffix":{"type":"string"},"rowDelimiter":{"type":"string","description":"Row delimiter (required)."},"colDelimiter":{"type":"string","description":"Column delimiter (required for delimited)."},"compositeDelimiter":{"type":"string","description":"Composite element delimiter (EDI formats)."}}},"fixed":{"type":"object","description":"Required when `format` is `fixed`.","properties":{"rowSuffix":{"type":"string"},"rowDelimiter":{"type":"string","description":"Row delimiter (required)."},"paddingChar":{"type":"string","description":"Padding character (required, single char)."}}},"skipEmptyEndColDelimiter":{"type":"boolean"},"skipIntermittentEmptyLines":{"type":"boolean"},"skipEDIValidation":{"type":"boolean"},"skipEDIProfileValidation":{"type":"boolean"},"rules":{"description":"Segment/element hierarchy. Can be an array of\nsegment objects or a single root container object\nwith `children`.","oneOf":[{"title":"Segment array","type":"array","items":{"type":"object","additionalProperties":true}},{"title":"Root container","type":"object","additionalProperties":true}]}},"required":["name","version","format","rules"]},"_fileDefinitionId":{"type":"string","description":"Reference an existing file definition by ID instead of\nproviding an inline definition."},"resourcePath":{"type":"string","description":"Dot-separated path into the parsed document to select\nwhich segment's data to return as records."}}},"options":{"type":"object","properties":{"ediProfile":{"type":"object","additionalProperties":true,"description":"Optional EDI profile for ISA/GS envelope context."}}}}}}}},"responses":{"200":{"description":"Parsed JSON records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredFileParserResponse"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"description":"File definition validation error or missing required segment.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"source":{"type":"string"},"code":{"type":"string","description":"Error code. Common values: `file_definition_error`,\n`missing_row`, `WRONG_MAX_OCCURRENCE`."},"resolved":{"type":"boolean"},"occurredAt":{"type":"integer"},"path":{"type":"string"}}}}}}}}}}}
```

## Generate structured file (EDI) from JSON

> Generates EDI or other structured/delimited file content from JSON\
> records using a file definition (generation rules). Commonly used\
> for producing X12 and EDIFACT documents.\
> \
> Unlike the parser endpoint, the generator places file definition\
> fields directly in \`rules\` (no \`fileDefinition\` wrapper). Each\
> element in the definition must include a \`value\` property containing\
> the literal text to output for that field.\
> \
> The \`data\` field must be an array of objects. Each object in the\
> array represents one document to generate. The response has\
> \`mediaType: "text"\` and does not include \`dataRecordTraceKeys\` or\
> \`traceKeysDuplicate\`.\
> \
> \*\*Required file definition fields\*\* — \`name\`, \`version\` (string\
> \`"1"\` or \`"2"\`), \`format\`, the format sub-object with\
> \`rowDelimiter\` + \`colDelimiter\` (and optionally \`rowSuffix\`), and\
> \`rules\` defining segments with elements that each have \`name\` and\
> \`value\`. This is a stateless transformation. File definition fields\
> go directly in \`rules\` (no \`fileDefinition\` wrapper, unlike the\
> parser endpoint).

```json
{"openapi":"3.2.0","info":{"title":"Parsers & Generators","version":"1.0.0"},"tags":[{"name":"Parsers & Generators","description":"Stateless data transformation processors that convert between raw formats\n(XML, CSV, EDI) and structured JSON. Parsers accept raw data and return\nJSON records; generators accept JSON and produce formatted output.\n\nThese are one-shot transformation calls — they do not create or modify\nany resources. Use them to test parsing rules, preview file definitions,\nor transform data outside of a flow. The filter and Handlebars processors\ntest a step's filter rules or templates the same way.\n\n## Processor descriptor schema\n\n{% openapi-schemas spec=\"processor\" schemas=\"ProcessorDescriptor\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"GeneratorResponse":{"type":"object","description":"Response from a generator processor (`csvDataGenerator`, `structuredFileGenerator`).","properties":{"mediaType":{"type":"string","description":"Always `text` for generator processors.","enum":["text"]},"data":{"type":"string","description":"Generated text output (CSV, EDI, or other structured format)."},"duration":{"type":"integer","description":"Processing time in milliseconds."}}}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/processors/structuredFileGenerator":{"post":{"operationId":"generateStructuredFile","tags":["Parsers & Generators"],"summary":"Generate structured file (EDI) from JSON","description":"Generates EDI or other structured/delimited file content from JSON\nrecords using a file definition (generation rules). Commonly used\nfor producing X12 and EDIFACT documents.\n\nUnlike the parser endpoint, the generator places file definition\nfields directly in `rules` (no `fileDefinition` wrapper). Each\nelement in the definition must include a `value` property containing\nthe literal text to output for that field.\n\nThe `data` field must be an array of objects. Each object in the\narray represents one document to generate. The response has\n`mediaType: \"text\"` and does not include `dataRecordTraceKeys` or\n`traceKeysDuplicate`.\n\n**Required file definition fields** — `name`, `version` (string\n`\"1\"` or `\"2\"`), `format`, the format sub-object with\n`rowDelimiter` + `colDelimiter` (and optionally `rowSuffix`), and\n`rules` defining segments with elements that each have `name` and\n`value`. This is a stateless transformation. File definition fields\ngo directly in `rules` (no `fileDefinition` wrapper, unlike the\nparser endpoint).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["data","rules"],"properties":{"data":{"type":"array","description":"Array of record objects. Each object represents one\ndocument to generate. The generator uses element `value`\nproperties from the rules, not field values from these\nobjects.","items":{"type":"object","additionalProperties":true}},"rules":{"type":"object","description":"File definition placed directly at this level (no\n`fileDefinition` wrapper). Must include `name`, `version`,\n`format`, the format sub-object, and `rules`.","required":["name","version","format","rules"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string","enum":["1","2"]},"format":{"type":"string","description":"File format type.","enum":["delimited","delimited/x12","delimited/edifact","fixed"]},"delimited":{"type":"object","description":"Required when `format` starts with `delimited`.","properties":{"rowSuffix":{"type":"string","description":"Appended after each row."},"rowDelimiter":{"type":"string","description":"Row delimiter (required)."},"colDelimiter":{"type":"string","description":"Column delimiter (required for delimited)."},"compositeDelimiter":{"type":"string","description":"Composite element delimiter (EDI formats)."}}},"fixed":{"type":"object","description":"Required when `format` is `fixed`.","properties":{"rowSuffix":{"type":"string"},"rowDelimiter":{"type":"string","description":"Row delimiter (required)."},"paddingChar":{"type":"string","description":"Padding character (required, single char)."}}},"skipEmptyEndColDelimiter":{"type":"boolean"},"rules":{"type":"array","description":"Array of segment definitions. Each segment has a `name`\nand `elements` array. Each element must have `name` and\n`value` (the literal text to output).","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true},"options":{"type":"object","properties":{"ediProfile":{"type":"object","additionalProperties":true,"description":"Optional EDI profile for ISA/GS envelope context."}}}}}}}},"responses":{"200":{"description":"Generated structured file content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratorResponse"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"description":"File definition validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string"},"code":{"type":"string","description":"Error code. Typically `INVALID_FILE_DEFINITION` or\n`wrong_data_type`."},"message":{"type":"string"},"details":{"type":"array","description":"Detailed validation errors.","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"}}}},"path":{"type":"string"}}}}}}}}}}}
```

## Test filter rules against records

> Evaluates export and import filter rules (\`Filter.expression\`) against the records in \`data\` and\
> returns the records that pass. Nothing is saved and no flow runs, so it checks a rule before the\
> rule is saved on a step. Rules are validated as they are when a filter is saved: an unknown\
> operator or a bare \`extract\` is refused with 422.\
> \
> Send each record bare, the way it reaches a step's filter. A record wrapped as\
> \`{"record": {...}}\` is evaluated as that wrapper, so field rules don't match it.

```json
{"openapi":"3.2.0","info":{"title":"Parsers & Generators","version":"1.0.0"},"tags":[{"name":"Parsers & Generators","description":"Stateless data transformation processors that convert between raw formats\n(XML, CSV, EDI) and structured JSON. Parsers accept raw data and return\nJSON records; generators accept JSON and produce formatted output.\n\nThese are one-shot transformation calls — they do not create or modify\nany resources. Use them to test parsing rules, preview file definitions,\nor transform data outside of a flow. The filter and Handlebars processors\ntest a step's filter rules or templates the same way.\n\n## Processor descriptor schema\n\n{% openapi-schemas spec=\"processor\" schemas=\"ProcessorDescriptor\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/processors/filter":{"post":{"operationId":"evaluateFilterRules","tags":["Parsers & Generators"],"summary":"Test filter rules against records","description":"Evaluates export and import filter rules (`Filter.expression`) against the records in `data` and\nreturns the records that pass. Nothing is saved and no flow runs, so it checks a rule before the\nrule is saved on a step. Rules are validated as they are when a filter is saved: an unknown\noperator or a bare `extract` is refused with 422.\n\nSend each record bare, the way it reaches a step's filter. A record wrapped as\n`{\"record\": {...}}` is evaluated as that wrapper, so field rules don't match it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rules","data"],"properties":{"rules":{"type":"object","description":"The filter expression to evaluate, in the shape of a step's `filter.expression`.","required":["version","rules"],"properties":{"version":{"type":"string","enum":["1"],"description":"Version of the filter format used by `rules`."},"rules":{"type":"array","description":"Prefix-notation rule in the grammar of `Filter.expression.rules`.","items":{}}}},"data":{"type":"array","description":"Records to evaluate, each a bare record object.","items":{"type":"object","additionalProperties":true}}}}}}},"responses":{"200":{"description":"The records that pass the rules.","content":{"application/json":{"schema":{"type":"object","properties":{"mediaType":{"type":"string","description":"Always `json` for the filter processor.","enum":["json"]},"data":{"type":"array","description":"The input records that pass the rules, unchanged and in input order.","items":{"type":"object","additionalProperties":true}},"duration":{"type":"integer","description":"Processing time in milliseconds."}}}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"description":"The rules are invalid, for example an unknown operator (\"Invalid operation: isnotempty.\") or\nan `extract` that is not wrapped in a type conversion (\"Field operation extract must be called\nby a Type Conversion Operation but was called by notempty.\"). A valid rule is refused the same\nway when a record holds a value its type conversion can't read: an `epochtime` operand on an\nempty string, a string that isn't a date, or epoch milliseconds sent as a string fails the\nwhole call with \"Invalid date. Cannot convert given string or number to date time.\",\nfollowed by `; record=` and that record as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Render a Handlebars template

> Renders a Handlebars template against the object in \`data\` and returns the result. Nothing is\
> saved and no flow runs, so it tests a template or a helper before the template is saved on a\
> step.\
> \
> \`data\` is the template's root context: \`{{name}}\` reads \`data.name\`. A template written for a\
> step reads the record as \`{{record.\<field>}}\`, so send the record under \`record\`\
> (\`"data": {"record": {...}}\`). Double braces HTML-escape the value (\`&\` renders as \`\&amp;\`);\
> triple braces insert it unchanged. A \`timestamp\` with no time zone renders in UTC.\
> \
> A null value, or a field under an object that is null, renders empty here. An HTTP import\
> escapes values its own way, at run time and in the import preview: in its JSON body a\
> double-brace value that is null, or under a null object, is written as the text \`null\`\
> (triple braces rendered \`{{{record.customer.name}}}\` empty, whether \`customer\` or its \`name\`\
> was null); in its relative URI a null field is sent as the text\
> \`null\`, and a field under a null object fails the record before anything is sent. Check a\
> nullable field with an import preview, not here.\
> \
> An unknown helper is refused with 422. \`GET /v1/processors\` lists helpers under the handlebars\
> entry's \`helperFunctions\`, but that list is not complete: \`eq\` and \`truncateWords\`, for\
> example, render although it omits them, so render a doubtful helper once here before relying\
> on it.

```json
{"openapi":"3.2.0","info":{"title":"Parsers & Generators","version":"1.0.0"},"tags":[{"name":"Parsers & Generators","description":"Stateless data transformation processors that convert between raw formats\n(XML, CSV, EDI) and structured JSON. Parsers accept raw data and return\nJSON records; generators accept JSON and produce formatted output.\n\nThese are one-shot transformation calls — they do not create or modify\nany resources. Use them to test parsing rules, preview file definitions,\nor transform data outside of a flow. The filter and Handlebars processors\ntest a step's filter rules or templates the same way.\n\n## Processor descriptor schema\n\n{% openapi-schemas spec=\"processor\" schemas=\"ProcessorDescriptor\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/processors/handlebars":{"post":{"operationId":"renderHandlebarsTemplate","tags":["Parsers & Generators"],"summary":"Render a Handlebars template","description":"Renders a Handlebars template against the object in `data` and returns the result. Nothing is\nsaved and no flow runs, so it tests a template or a helper before the template is saved on a\nstep.\n\n`data` is the template's root context: `{{name}}` reads `data.name`. A template written for a\nstep reads the record as `{{record.<field>}}`, so send the record under `record`\n(`\"data\": {\"record\": {...}}`). Double braces HTML-escape the value (`&` renders as `&amp;`);\ntriple braces insert it unchanged. A `timestamp` with no time zone renders in UTC.\n\nA null value, or a field under an object that is null, renders empty here. An HTTP import\nescapes values its own way, at run time and in the import preview: in its JSON body a\ndouble-brace value that is null, or under a null object, is written as the text `null`\n(triple braces rendered `{{{record.customer.name}}}` empty, whether `customer` or its `name`\nwas null); in its relative URI a null field is sent as the text\n`null`, and a field under a null object fails the record before anything is sent. Check a\nnullable field with an import preview, not here.\n\nAn unknown helper is refused with 422. `GET /v1/processors` lists helpers under the handlebars\nentry's `helperFunctions`, but that list is not complete: `eq` and `truncateWords`, for\nexample, render although it omits them, so render a doubtful helper once here before relying\non it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rules","data"],"properties":{"rules":{"type":"object","required":["template"],"properties":{"template":{"type":"string","description":"The Handlebars template to render."},"resultMode":{"type":"string","description":"Form of the result; `text` returns the rendered string."}}},"data":{"type":"object","additionalProperties":true,"description":"Root context the template renders against."}}}}}},"responses":{"200":{"description":"The rendered template.","content":{"application/json":{"schema":{"type":"object","properties":{"mediaType":{"type":"string","description":"Always `text` for the handlebars processor.","enum":["text"]},"data":{"description":"The rendered result, normally a string. A template that renders only a helper's\nnumeric result can come back as a JSON number."},"duration":{"type":"integer","description":"Processing time in milliseconds."}}}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"description":"The template could not be rendered, for example because it calls a helper that does not\nexist ('Missing helper: \"first\"').","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
