I need to send some data from a webhook to a platform’s API.
I’m managing to extract the data from the webhook, but when I send the data to the API, it’s giving an error.
Here is the API documentation: Hyros · Apiary
I need to send the “email”, “name” and “price”. The last two are inside the “items” array so I’m not sure how to do that.
I don’t know if you can do this using the fields or if I need to send everything through a JSON code.
It is giving the following error:
{"status":"rejected","reason":{"message":"400 - \"{\\\"result\\\":\\\"ERROR\\\",\\\"message\\\":[\\\"Missing required field: Items\\\"]}\"","name":"Error","stack":"Error: 400 - \"{\\\"result\\\":\\\"ERROR\\\",\\\"message\\\":[\\\"Missing required field: Items\\\"]}\"\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)"}}
Here’s a screenshot:
[ removed for security reasons ]