N8n Integration: Using HTTP Request node

Anyone familiar with n8n and the HTTP Request node ?

I am using n8n for automated workflows and trying to get the HTTP Request node to send the correct request.

{
  "payload": {
    "Header": {
      "MessageType": "Request",
      "SubmissionNumber": "73cc27b5-c747-4588-9602-965ceee8639d",
      "Authentication": {
        "AccNumber": "6131603418",
        "MD5Value": "319f4368d0b633fa23177d6c7c710583",
        "ApplicationID": "9fe39528-d7c0-43f7-8575-83fd589413be"
      }
    },
    "Body": {
      "SearchParameters": {
        "OrderResultsBy": "Position",
        "AccountTypes": {
          "AccountType": [
            "CURRENT",
            "CREDITCARD"
          ]
        },
        "ShowHidden": "false",
        "GetOpenBankingConsents": "false"
      }
    }
  }
}


but it cannot form the header and body inside a payload.

I am trying to call Bank_GetAccounts API Schema

No matter what I do it doesn’t seem able to create the payload : ??

{
    "body": {
        "SearchParameters": {
            "OrderResultsBy": "Position",
            "AccountTypes": {
                "AccountType": [
                    "CURRENT",
                    "CREDITCARD"
                ]
            }
        }
    },
    "headers": {
        "messagetype": "Request",
        "submissionnumber": "M7RXF8vKSd",
        "authentication": "{\"AccNumber\": \"6131603418\", \"MD5Value\": \"c13bdd601ea95983c1e7a78a8d8bb420\", \"ApplicationID\": \"9fe39528-d7c0-43f7-8575-83fd589413be\"}",
        "accept": "application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7"
    },
    "method": "POST",
    "uri": "https://api.quickfile.co.uk/1_2/Bank/GetAccounts",
    "gzip": true,
    "rejectUnauthorized": true,
    "followRedirect": true,
    "resolveWithFullResponse": true,
    "followAllRedirects": true,
    "timeout": 300000,
    "encoding": null,
    "json": false,
    "useStream": true
}

I have only been able to get this to work by using an old version of the node and pasting the raw JSON directly into the Body.

Is a PAYLOAD normal practice in API ?

{
“payload”: {
“Header”: {
},
“Body”: {
},
}
}

OK. So for everyone’s else’s benefit there is a work around.

I used a older HTTP Request from n8n where I could cut and past the entire JSON into the body.

With my pre-processing of the MD5 values and API keys I can now access the QuickFile API via n8n automations.

{
  "nodes": [
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://api.quickfile.co.uk/1_2/Bank/GetAccounts",
        "jsonParameters": true,
        "options": {},
        "bodyParametersJson": "= {\n  \"payload\": {\n    \"Header\": {\n      \"MessageType\": \"{{ $json.MessageType }}\",\n      \"SubmissionNumber\": \"{{ $json.SubmissionNumber }}\",\n      \"Authentication\": {\n        \"AccNumber\": \"{{ $json.AccNumber }}\",\n        \"MD5Value\": \"{{ $json.MD5Value }}\",\n        \"ApplicationID\": \"{{ $json.ApplicationID }}\"\n      }\n    },\n    \"Body\": {\n      \"SearchParameters\": {\n        \"OrderResultsBy\": \"Position\",\n        \"AccountTypes\": {\n          \"AccountType\": [\n            \"CURRENT\",\n            \"CREDITCARD\"\n          ]\n        },\n        \"ShowHidden\": \"false\",\n        \"GetOpenBankingConsents\": \"false\"\n      }\n    }\n  }\n}",
        "headerParametersJson": "=",
        "queryParametersJson": "="
      },
      "name": "Bank/GetAccounts",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        360,
        -420
      ],
      "id": "446e193e-e72d-4252-b6d9-5715f5e9ed6f"
    }
  ],
  "connections": {},
  "pinData": {}
}

But I’d still like to know why Quickfile API needs a “payload” if this is meant to be a more RESTful interface and not SOAP ??

I will raise a new ticket for that specific query.