Files
api-collections/bruno/collections/elixForms API v2/EFTL processing/CCT - Proposta Operatore/Voce indice fascicolazione.yml
T
pierpaolo.mammi 6c7ebcd3a5 elixForms API v2
- reorg Proposta CCT requests
- update requests from Production of Proposta CCT
- update templates EFTL code
2026-08-25 15:19:31 +02:00

59 lines
1.7 KiB
YAML

info:
name: Voce indice fascicolazione
type: http
seq: 5
http:
method: POST
url: "{{elixFormsApiUrl}}/eftl/process/v1"
headers:
- name: x-requested-with
value: XMLHttpRequest
- name: x-api-key
value: "{{elixFormsWsAuthenticationToken}}"
- name: x-ef-request-id
value: "17144"
disabled: true
- name: x-ef-request-id
value: "25889"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT"
}
}
auth: inherit
runtime:
scripts:
- type: before-request
code: |-
const { prepareEftlDocument } = require("./elixFormsJs.js")
// Copy-pasta your EFTL document below inside the template literals (`)
prepareEftlDocument(String.raw`
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
[VAR name="tipologiaCodice" type="string"][TAG]GETVALUEBYTAG,TIPOLOGIA_CODICE,REQUEST,IUQOID[/TAG][/VAR]
[VAR name="suffissoVoceIndice" type="string"][% suffissoVoceIndice = "Contratti"; %][/VAR]
[VAR name="tipologieContoTerzi" type="iterable"][SPLIT regex=";"][TAG]GETVALUEBYTAG,TIPOLOGIE_VOCE_INDICE_CONTOTERZI,REQUEST,IUQOID[/TAG][/SPLIT][/VAR]
[IF]
[CONDITION]
[CONTAINS varname="tipologieContoTerzi"][VALUE_OF varname="tipologiaCodice" /][/CONTAINS]
[/CONDITION]
[THEN][% suffissoVoceIndice = "ContoTerzi"; %][/THEN]
[/IF]
[%= suffissoVoceIndice %]
[/EFTL]
`);
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: true