NEWBIE
I am using the HTTP request node to execute a “Bank_GetAccounts Schema” from my book keeping SW.
I am new to n8n and API’s etc but have so far used n8n to generate random numbers for the submission key and an MD5 Crypto; all matching the APIs authentication needs but …
The API Doc kindly shows the exact JSON construct to send as a request.
{
"payload": {
"Header": {
"MessageType": "Request",
"SubmissionNumber": "61601e61-c346-4348-bd22-25214b5ef06a",
"Authentication": {
"AccNumber": "6131603418",
"MD5Value": "90a2c38c9d2ca1ad5c40abe276544563",
"ApplicationID": "9fe39528-d7c0-43f7-8575-83fd589413be"
}
},
"Body": {
"SearchParameters": {
"OrderResultsBy": "Position",
"AccountTypes": {
"AccountType": [
"CURRENT",
"CREDITCARD"
]
},
"ShowHidden": "false",
"GetOpenBankingConsents": "false"
}
}
}
}
What is the error message (if any)?
400 - "{\"Errors\":{\"Error\":[\"Posted json has missing root node: payload\"]}}"
I found a post relating to “JSON/RAW Parameters” but I don’t have this option. Is there a config I have to set, the help docs don’t mention it.
Please share your workflow
My HEADER JSON appears to be grabbing all the correct input as the Result window shows the output matches the API Doc example.
I then use JSON as my BODY content as follows.
So far to me anyway the Header and Body look like the given API Doc example.
EXCEPT for one thing. The Example shows { “payload” : { etc
I TEST the execution of the node and receive a response from the endpoint of 400 - “{"Errors":{"Error":["Posted json has missing root node: payload"]}}”
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Information on your n8n setup
- n8n cloud:
- Windows 11
Can anyone guide me on getting my first API working I feel once I crack this I’ll be off… I tried using the Chrome Developer Console but it’s not clear what I am looking for. I kind of need to know how n8n constructs the JSON request to the API endpoint but the final result of the “node” config is hidden…
This is the whole workflow so far. (API keys are fake)