curl --request PUT \
--url https://staging-api.tyms.io/v1/adam/expenses/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"branch": "<string>",
"branch_uuid": "<string>",
"department": "<string>",
"department_uuid": "<string>",
"project_uuid": "<string>"
}
'import requests
url = "https://staging-api.tyms.io/v1/adam/expenses/{uuid}"
payload = {
"branch": "<string>",
"branch_uuid": "<string>",
"department": "<string>",
"department_uuid": "<string>",
"project_uuid": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
branch: '<string>',
branch_uuid: '<string>',
department: '<string>',
department_uuid: '<string>',
project_uuid: '<string>'
})
};
fetch('https://staging-api.tyms.io/v1/adam/expenses/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Expense updated successfully",
"data": {
"uuid": "770e8400-e29b-41d4-a716-446655440003",
"narration": "Updated expense narration"
}
}Update expense
curl --request PUT \
--url https://staging-api.tyms.io/v1/adam/expenses/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"branch": "<string>",
"branch_uuid": "<string>",
"department": "<string>",
"department_uuid": "<string>",
"project_uuid": "<string>"
}
'import requests
url = "https://staging-api.tyms.io/v1/adam/expenses/{uuid}"
payload = {
"branch": "<string>",
"branch_uuid": "<string>",
"department": "<string>",
"department_uuid": "<string>",
"project_uuid": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
branch: '<string>',
branch_uuid: '<string>',
department: '<string>',
department_uuid: '<string>',
project_uuid: '<string>'
})
};
fetch('https://staging-api.tyms.io/v1/adam/expenses/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Expense updated successfully",
"data": {
"uuid": "770e8400-e29b-41d4-a716-446655440003",
"narration": "Updated expense narration"
}
}Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Path Parameters
Body
Labels you can change on a bill, expense, or income. Send ids. Names are ignored. Leave a field out to keep the current value. An unknown id is saved as sent and does not create a record. Other fields from the create body can still be sent.
Branch id. Same as branch_uuid. A name is not accepted.
Branch id from GET /branches. Alias: branch. A name is not accepted.
Department id. Same as department_uuid. A name is not accepted, and an unknown id does not create a department.
Department id from GET /departments. Alias: department.
Project id from GET /projects. A name is not accepted, and an unknown id does not create a project.
Response
Expense updated