Edit expense item
This interface is used to edit expense item details or approval the expense item.
Edit expense item
POST /edit-ee-expense
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
expense_id
number
Marco expense item's id
expense_date
date
Expense date
expense_name
string
Expense name or type
expense_status
string
Expense status Valid value - Submitted/Approved/Rejected/Processing/Processed
expense_currency
string
Expense currency
expense_amount
number
Expense amount
expense_notes
string
Expense notes or details
origin
string
Origin - For travel-related expenses
destination
string
Destination - For travel-related expenses
travel_start_date
date
Travel start date - For travel-related expenses
travel_end_date
date
Travel end date - For travel-related expenses
tax_free_payment_amount
number
The tax-free portion of th expense amount
tax_free_payment_currency
string
The tax-free portion's currency
taxable_payment_amount
number
The taxable portion of th expense amount
taxable_payment_currency
string
The taxable portion's currency
files
list of file resource
Related files
Parameter Example
{
"expense_id": 4972,
"expense_date": "2024-10-12",
"expense_name": "Hotel3",
"expense_status": "Submitted",
"expense_currency": "CNY",
"expense_amount": "600",
"expense_notes": "Testing",
"origin": "China",
"destination": "Singapore",
"travel_start_date": "2024-10-07",
"travel_end_date": "2024-10-09",
"tax_free_payment_amount":"400",
"tax_free_payment_currency":"CNY",
"taxable_payment_amount":"200",
"taxable_payment_currency":"CNY",
"files":[]
}Request Example
var form = new FormData();
form.append("expense_id", "4972");
form.append("expense_date", "2024-10-12");
form.append("expense_name", "Hotel3");
form.append("expense_status", "Submitted");
form.append("expense_currency", "CNY");
form.append("expense_amount", "600");
form.append("expense_notes", "Testing");
form.append("origin", "China");
form.append("destination", "Singapore");
form.append("travel_start_date", "2024-10-07");
form.append("travel_end_date", "2024-10-09");
form.append("tax_free_payment_amount", "400");
form.append("tax_free_payment_currency", "CNY");
form.append("taxable_payment_amount", "200");
form.append("taxable_payment_currency", "CNY");
form.append("files[0]", fileInput.files[0], "/C:/Users/ZhounanZhang/OneDrive - Marco Global Payroll Pte Ltd/Desktop/New Microsoft Word Document.docx");
var token = YOUR_TOKEN
var settings = {
"url": "https://api.marcopayroll.com/api:eZ5RDmx2/api/edit-ee-expense",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": token
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});import requests
url = "https://api.marcopayroll.com/api:eZ5RDmx2/api/edit-ee-expense"
token = YOUR_TOKEN
payload = {'expense_id': '4972',
'expense_date': '2024-10-12',
'expense_name': 'Hotel3',
'expense_status': 'Submitted',
'expense_currency': 'CNY',
'expense_amount': '600',
'expense_notes': 'Testing',
'origin': 'China',
'destination': 'Singapore',
'travel_start_date': '2024-10-07',
'travel_end_date': '2024-10-09',
'tax_free_payment_amount':'400',
'tax_free_payment_currency':'CNY',
'taxable_payment_amount':'200',
'taxable_payment_currency':'CNY'}
files=[
('files[0]',('New Microsoft Word Document.docx',open('/C:/Users/ZhounanZhang/OneDrive - Marco Global Payroll Pte Ltd/Desktop/New Microsoft Word Document.docx','rb'),'application/vnd.openxmlformats-officedocument.wordprocessingml.document'))
]
headers = {
'Authorization': token
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Response
{
"id": 5369,
"customer_id": 1,
"expense_date": "2024-10-12",
"expense_currency": "CNY",
"expense_amount": 600,
"title": "Hotel3",
"doc_list": [
{
"id": 22289,
"file_name": "600x400.svg",
"file_type": "svg",
"file_url": "https://marcopayroll-production.s3.ap-southeast-1.amazonaws.com/img/95574bd2-7f3b-42ec-94f1-03286bae0526-1730272955105.svg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAR7OVYMK3MWXZDBXJ%2F20241030%2Fap-southeast-1%2Fs3%2Faws4_request&X-Amz-Date=20241030T092349Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Signature=f6487632b2260358eed7a4dbedf030af4cae32770685137b95563d1ae7b9f2cc",
"created_at": 1730272955205,
"updated_at": 1730272955205,
"last_modified_by": 1818,
"deleted_at": null
}
],
"notes": "Testing",
"travel_start_date": "2024-10-07",
"travel_end_date": "2024-10-09",
"origin": "China",
"destination": "Singapore",
"status": "Submitted",
"approver": 0,
"decision_time": null,
"decision": "",
"reject_notes": "",
"tax_free_payment_amount": 400,
"tax_free_payment_currency": "CNY",
"tax_free_payment_entity": 0,
"taxable_payment_amount": 200,
"taxable_payment_currency": "CNY",
"taxable_payment_entity": 0,
"processing_notes": null,
"tax_record_list": [],
"user": 2232,
"platform_email": "[email protected]"
}{
"error": "Invalid request"
}Last updated