Files
api-collections/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Codice fiscale ammesso.yml
T
2026-03-24 16:32:27 +01:00

67 lines
2.2 KiB
YAML

info:
name: Codice fiscale ammesso
type: http
seq: 1
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: "24218"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT",
"crlf": "\r\n",
"codiciFiscaliAmmessi": ";MMMPPL74T17E463A;;"
}
}
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="isRichiedenteInRS" type="string"][% isRichiedenteInRS = "Utente non ammesso alla compilazione perché non risulta fra i Responsabili Scientifici del contratto!"; %][/VAR]
[VAR name="responsabiliScientifici" type="string"][TAG]GETVALUEBYTAG,CONTRATTO_RESPONSABILI,REQUEST,IUQOID[/TAG][/VAR]
[VAR name="codiceFiscaleUtente" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
[VAR name="codiceFiscaleUtenteDebug" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
[% codiceFiscaleUtente = ", CF: " + codiceFiscaleUtente + ","; %]
[IF]
[CONDITION][CONTAINS varname="responsabiliScientifici"][VALUE_OF varname="codiceFiscaleUtente" /][/CONTAINS][/CONDITION]
[THEN][% isRichiedenteInRS = ""; %][/THEN]
[ELSE IF]
[CONDITION][CONTAINS varname="codiciFiscaliAmmessi"][VALUE_OF varname="codiceFiscaleUtenteDebug" /][/CONTAINS][/CONDITION]
[THEN][% isRichiedenteInRS = ""; %][/THEN]
[/ELSE IF]
[/IF]
[%= responsabiliScientifici %]
[%= crlf %]
[%= codiceFiscaleUtente %]
[%= crlf %]
[%= isRichiedenteInRS %]
[/EFTL]
`);
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5