{
"UserPrefix": "string",
"UserFullName": "string",
"UserEmail": "string",
"ProfileCode": "string",
"IsSendNotification": "integer",
"NotificationEmail": "string",
"NotificationCustomMessage": "string",
"Expenses": [
{
"ExpenseDate": "DateTime",
"ExpenseFileNumber": "string",
"ExpensePrefix": "string",
"ExpenseReference": "string",
"ExpenseCode": "string",
"ExpenseGLCode": "string",
"ExpenseDescription": "string",
"ExpenseNetAmount": "decimal",
"Tax1Amount": "decimal",
"Tax2Amount": "decimal",
"ExpenseBillable": "boolean",
"ExpenseTaxable": "boolean",
"ExpenseUI": "string",
"ExpenseUpdDate": "DateTime?"
}
]
}
{
"RequestID": "integer",
"TotalRecords": "integer",
"TotalUpdated": "integer",
"TotalInserted": "integer",
"TotalErrors": "integer",
"Expenses": [
{
"ID": "string",
"ExpenseDate": "DateTime",
"ExpenseFileNumber": "string",
"ExpensePrefix": "string",
"ExpenseReference": "string",
"ExpenseCode": "string",
"ExpenseGLCode": "string",
"ExpenseDescription": "string",
"ExpenseNetAmount": "decimal",
"Tax1Amount": "decimal",
"Tax2Amount": "decimal",
"ExpenseBillable": "boolean",
"ExpenseTaxable": "boolean",
"ExpenseUI": "string",
"ExpenseUpdDate": "DateTime?",
"ImportNotes": "string",
"ImportStatus": "string"
}
]
}
crossDomain: true,
contentType: 'application/json; charset=utf-8',
dataType: 'json',
data: JSON.stringify(Expenses),
headers: {
'Authorization': 'Bearer ' + apiKey,
'sd:' + subDomain,
'Content-Type': 'application/json'
}
var Expenses =
{
"UserPrefix": "BS",
"UserFullName": "Brian Smith",
"UserEmail": "info@lawpractica.com",
"ProfileCode": "LP-DE",
"IsSendNotification": "0",
"NotificationEmail": "notification@example.com",
"NotificationCustomMessage": "This is a custom notification message",
"Expenses": [
{
"ExpenseDate": "2024-01-29",
"ExpenseFileNumber": "EX-2024-001",
"ExpenseReference": "Invoice #1234",
"ExpenseCode": "OFFICE_SUPPLIES",
"ExpenseGLCode": "1010",
"ExpenseDescription": "Purchase of printer cartridges and paper",
"ExpenseNetAmount": 75.42,
"Tax1Amount": 6.03,
"Tax2Amount": 0.00,
"ExpenseBillable": true,
"ExpenseTaxable": true,
"ExpenseUI": "EXP0001",
"ExpenseUpdDate": "2024-01-29T15:00:00"
},
{
"ExpenseDate": "2024-01-30",
"ExpenseFileNumber": "EX-2024-002",
"ExpenseReference": "Travel Receipt",
"ExpenseCode": "TRAVEL_TRANSPORT",
"ExpenseGLCode": "5020",
"ExpenseDescription": "Taxi fare to client meeting",
"ExpenseNetAmount": 28.00,
"Tax1Amount": 2.24,
"Tax2Amount": 0.00,
"ExpenseBillable": true,
"ExpenseTaxable": true,
"ExpenseUI": "EXP0002",
"ExpenseUpdDate": "2024-01-29T15:00:00"
}
]
}
200: function () {
console.log("200 - Success");
},
//when any of info not supplied (without json object(ajax) either in URL parameters)
400: function (request, status, error) {
alert(error);
},
//when any of supplied info is empty
411: function (request, status, error) {
alert(error);
},
//when the provided info is not invalid
422: function (request, status, error) {
alert(error);
},
500: function (request, status, error) {
alert(error);
}