I’m having a major issues with n8n. I’m making a HTTP request to the API, the API expect a double but n8n keep sending it an INT, even when hardcoded to a double.
This only happens when the double is a zero value, for example, 66.00, however, 66.01 works without issues.
This issue is not API related as I’ve tried on SwaggerHub and with Insomnia and it works with a zero double (66.00 for example). The issues purely occurs with n8n.
this is the my http request
Its this line that is cause the issue “amount”: {{ $(‘Supabase2’).item.json.payableGross.toFixed(2) }},
It results in “amount”: 66.00,
However, I get this error: “400 - “{"error":{"errors":[{"type":-1,"msg":"Value type mismatch for amount. (Was expecting double, but received type: integer, value: 66)","errors":}],"code":400,"message":"Invalid request"}}””
this is the output of the HTTP request that is causing the error:
{
"property": {
"id": 1692
},
"description": "Leak under the sink was fixed with a new pipe.",
"date": {
"date": "2024-08-30 10:10:15",
"timezone": "Europe/London"
},
"amount": 66.00,
"expense_category": 1,
"contractor": {
"id": 268,
"reference": "IS15174131 - IS15174131"
}
}
Can anyone help please!?
this is it working in insomnia: