Hello,
Try using REST API (add action) in ASP.NET Maker 2022. Always getting failed result with,
{
"success": false,
"error": "Failed to create instance",
"version": "19.8.0"
}
my code,
$.ajax({
url: "api/add/Orders",
method: "post",
data: "OrderID=12345",
async: false,
cache: false,
beforeSend: function(request) {
request.setRequestHeader("Authorization", "Bearer "+store.JWT);
},
success: function(result, status, xhr) {
console.log( result );
},
complete: function(xhr, status) {
console.log( status );
}
});
Any help would be appreciated.
Thanks.