const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
date: '2026-03-03',
currency: 'NGN',
document_number: 'EXP-220',
narration: 'Team lunch — client meeting',
customer: 'c9b8a7d6e5f4438290a1b2c3d4e5f6c0',
payment_category: 'Main Operating Account',
amount_paid: 18500,
items: [
{
item_name: 'Meals and entertainment',
quantity: 1,
selling_price: 18500,
category: 'Meals & Entertainment'
}
]
})
};
fetch('https://staging-api.usetyms.com/v1/adam/create/expense', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));