curl --request POST \
--url https://api.royalti.io/expense/bulk/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"550e8400-e29b-41d4-a716-446655440000",
"6ba7b810-9dad-11d1-80b4-00c04fd430c8"
]
}
'{
"message": "Expenses deleted successfully",
"count": 2
}Delete Bulk Expenses
curl --request POST \
--url https://api.royalti.io/expense/bulk/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"550e8400-e29b-41d4-a716-446655440000",
"6ba7b810-9dad-11d1-80b4-00c04fd430c8"
]
}
'{
"message": "Expenses deleted successfully",
"count": 2
}/expense/bulk/delete endpoint allows deletion of multiple expense records simultaneously.
Method:POST
Request Payload:
| Parameter | Type | Description |
|---|---|---|
| ids | array | Array of expense IDs to delete |
const response = await fetch('https://api.royalti.io/expense/bulk/delete', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"ids": [
{}
]
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Array of expense IDs to delete