PostgreSQL function parameters JSON to TYPE
One can use json_populate_record() to achieve this.  It's very easy to use:

json_populate_record(null::API_CAR, &lt;your JSON here&gt;)




Exemple with NodeJS : 

exports.carPATCH = function (apiKey, args, res, next) {

    let car = "'" + JSON.stringify(args.v_car.value) + "'";
    apiKey = "'" + apiKey + "'";

    DB.query.any("SELECT * FROM v01_api_patch_carPATCH" +
        "(json_populate_record(NULL::API_CAR," + car + ")," + apiKey + ")", [true])
        .then(data =&gt; {
            res = resp.response_201(res, data);
        })
        .catch(error =&gt; {
            res = resp.error(res, error);
        })
};


And after, my function work perfectly because it's an object API_CAR