Files
api-collections/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Numero ripartizioni da form partecipanti.yml
T

53 lines
1.4 KiB
YAML

info:
name: Numero ripartizioni da form partecipanti
type: http
seq: 3
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: "19758"
disabled: true
- name: x-ef-request-id
value: "23761"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT",
"crlf": "\r\n"
}
}
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="ripartizioniIterable" type="iterable"][SPLIT regex="#" emptyIfBlank="true"][TAG]GETVALUEBYTAG,PARTECIPANTE,REQUEST,IUQOID,CONCAT,#[/TAG][/SPLIT][/VAR]
[VAR name="ripartizioniCount" type="string"][SIZE_OF varname="ripartizioniIterable" /][/VAR]
[%= ripartizioniCount %]
[%= crlf %]
[%= ripartizioniIterable %]
[/EFTL]
`);
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5