Why do I keep getting "Internal Server Error" while trying to send a POST request from Zapier?

Here is my code :
// Backend: backend/Quote-module.jsw

import {created, serverError} from ‘wix-http-functions’ ;
import wixData from ‘wix-data’ ;

export function post_storerecords(request) { // POST = Method

let options = {
“headers” : {
“Content-Type” : “application/json”
}
};
return request.body.json()
.then(body => {

let recordInsert = {
“firstName” : body.firstName,
“lastName” : body.lastName,
“email” : body.source,
“phone” : body.phone,
“totalEmployees” : body.totalEmployees,
“miniPerMonthPerEmployeeWithoutTax” : body.miniPerMonthPerEmployeeWithoutTax,
“miniPerMonthPerEmployeeWithTax” : body.miniPerMonthPerEmployeeWithTax,
“miniAllEmployeesPerYearWithTax” : body.miniAllEmployeesPerYearWithTax,
“midiPerMonthPerEmployeeWithoutTax” : body.midiPerMonthPerEmployeeWithoutTax,
“midiPerMonthPerEmployeeWithTax” : body.midiPerMonthPerEmployeeWithTax,
“midiAllEmployeesPerYearWithTax” : body.midiAllEmployeesPerYearWithTax,
“maxiPerMonthPerEmployeeWithoutTax” : body.maxiPerMonthPerEmployeeWithoutTax,
“maxiPerMonthPerEmployeeWithTax” : body.maxiPerMonthPerEmployeeWithTax,
“maxiAllEmployeesPerYearWithTax” : body.maxiAllEmployeesPerYearWithTax,
“ultimatePerMonthPerEmployeeWithoutTax” : body.ultimatePerMonthPerEmployeeWithoutTax,
“ultimatePerMonthPerEmployeeWithTax” : body.ultimatePerMonthPerEmployeeWithTax,
“ultimateAllEmployeesPerYearWithTax” : body.ultimateAllEmployeesPerYearWithTax,
};

// insert the item in a collection
return wixData.insert( “GetaQuote” , JSON.parse(body));
} )
.then( (results) => {
options.body = {
“inserted” : results
};
return created(options);
} )

// error handling
. catch ( (error) => {
options.body = {
“error” : error
};
return serverError(options);
} );
}

It is possible that the problem may lie in the internal server. Here’s what you need to do. Restart your device and try to clear the cache. Since this situation can be quite frequent, all users start with this. Just do not clear all internal memory because you can lose all the necessary files.

You have a mistake in your insert.
It should be:

return wixData.insert("GetaQuote", recordInsert);

Ah, just saw it is a very old question. So it’s probably no longer relevant to you.