Update invoice payments
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/invoices/{uuid}/payments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"payments": [
{
"amount_paid": 123,
"category": "<string>",
"date": "2023-12-25",
"uuid": "<string>",
"exchange_rate": 123
}
],
"overwrite": false
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/invoices/{uuid}/payments"
payload = {
"payments": [
{
"amount_paid": 123,
"category": "<string>",
"date": "2023-12-25",
"uuid": "<string>",
"exchange_rate": 123
}
],
"overwrite": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payments: [
{
amount_paid: 123,
category: '<string>',
date: '2023-12-25',
uuid: '<string>',
exchange_rate: 123
}
],
overwrite: false
})
};
fetch('https://staging-api.usetyms.com/v1/adam/invoices/{uuid}/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Invoice payments updated successfully",
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440001",
"payments": [
{
"uuid": "pay-uuid-1",
"amount_paid": 500,
"category": "Bank Transfer",
"date": "2024-01-20",
"exchange_rate": 1
}
]
}
}Invoices
Update invoice payments
POST
/
invoices
/
{uuid}
/
payments
Update invoice payments
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/invoices/{uuid}/payments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"payments": [
{
"amount_paid": 123,
"category": "<string>",
"date": "2023-12-25",
"uuid": "<string>",
"exchange_rate": 123
}
],
"overwrite": false
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/invoices/{uuid}/payments"
payload = {
"payments": [
{
"amount_paid": 123,
"category": "<string>",
"date": "2023-12-25",
"uuid": "<string>",
"exchange_rate": 123
}
],
"overwrite": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payments: [
{
amount_paid: 123,
category: '<string>',
date: '2023-12-25',
uuid: '<string>',
exchange_rate: 123
}
],
overwrite: false
})
};
fetch('https://staging-api.usetyms.com/v1/adam/invoices/{uuid}/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Invoice payments updated successfully",
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440001",
"payments": [
{
"uuid": "pay-uuid-1",
"amount_paid": 500,
"category": "Bank Transfer",
"date": "2024-01-20",
"exchange_rate": 1
}
]
}
}Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Path Parameters
Body
application/json
If true, replaces all existing payments.
Response
200 - application/json
Payments applied to invoice