info:
  name: TAG per protocollazione fra uffici
  type: http
  seq: 4

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: "29674"
  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" /]

        - document_type: interno
        - document_is_draft: false
        - document_subject: Autorizzazione al pagamento - [TAG]GETVALUEBYTAG,ID_CONTRATTO,REQUEST,IUQOID[/TAG] - [TAG]GETVALUEBYTAG,ELENCO_CONTRAENTI_CSV,REQUEST,IUQOID[/TAG] - [TAG]GETVALUEBYTAG,ELENCO_RS_CSV,REQUEST,IUQOID[/TAG] - [TAG]GETVALUEBYTAG,TITOLO_CONTRATTO,REQUEST,IUQOID[/TAG]
        - document_means: elixForms
        - document_index_title: elixForms - Autorizzazione Pagamento Liquidazione
        - document_minutes_discard: 99
        - document_minutes_class_cod: 03/19
        - document_minutes_sender_surname: [TAG]GETVALUEBYTAG,AUTORIZ_RAG_COGNOME,REQUEST,IUQOID[/TAG]
        - document_minutes_sender_office_name: [TAG]GETVALUEBYTAG,AUTORIZ_RAG_UO,REQUEST,IUQOID[/TAG]


        [/EFTL]
        `);

settings:
  encodeUrl: true
  timeout: 0
  followRedirects: true
  maxRedirects: 5
  forwardAuthorizationHeader: true
