Reconcile a bank movement
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/bank-movements/{bank_movement_id}/reconciliation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "121.00"
}
]
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/bank-movements/{bank_movement_id}/reconciliation"
payload = { "documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "121.00"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documents: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: '121.00'}]})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/bank-movements/{bank_movement_id}/reconciliation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "statement",
"booked_on": "2023-12-25",
"amount": "121.00",
"currency": "<string>",
"concept": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"statement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"value_on": "2023-12-25",
"balance_after": "<string>",
"counterparty_name": "<string>",
"counterparty_iban": "<string>",
"reference": "<string>",
"reconciliation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"documents": [
{
"type": "expense",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "121.00"
}
]
},
"proposal": {
"document_type": "expense",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "121.00",
"party": "<string>",
"number": "<string>",
"reasons": [
"amount"
]
}
}{
"error": "lines[0].vat_rate must be 21, 10, 4 or 0",
"code": "invalid_invoice",
"request_id": "req_01JAB3K9X2"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}{
"error": "The tax return changed or is not ready for approval",
"code": "version_conflict",
"request_id": "req_01JAB3K9X2"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>"
}Banking
Reconcile a bank movement
Settles the movement against one or more open expenses, income or invoices.
POST
/
companies
/
{company_id}
/
bank-movements
/
{bank_movement_id}
/
reconciliation
Reconcile a bank movement
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/bank-movements/{bank_movement_id}/reconciliation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "121.00"
}
]
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/bank-movements/{bank_movement_id}/reconciliation"
payload = { "documents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "121.00"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documents: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: '121.00'}]})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/bank-movements/{bank_movement_id}/reconciliation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "statement",
"booked_on": "2023-12-25",
"amount": "121.00",
"currency": "<string>",
"concept": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"statement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"value_on": "2023-12-25",
"balance_after": "<string>",
"counterparty_name": "<string>",
"counterparty_iban": "<string>",
"reference": "<string>",
"reconciliation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"documents": [
{
"type": "expense",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "121.00"
}
]
},
"proposal": {
"document_type": "expense",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "121.00",
"party": "<string>",
"number": "<string>",
"reasons": [
"amount"
]
}
}{
"error": "lines[0].vat_rate must be 21, 10, 4 or 0",
"code": "invalid_invoice",
"request_id": "req_01JAB3K9X2"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}{
"error": "The tax return changed or is not ready for approval",
"code": "version_conflict",
"request_id": "req_01JAB3K9X2"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>"
}Live capability. Melso runs this in production today. Partner keys reach it once your partner account is enabled. See Availability.
A person decides. The company’s owner makes this call, signed in to Melso. Partner keys cannot make it: send the person the approval link instead. See Approvals and filing.
amount is settled for what is still
outstanding. Whatever the movement does not settle stays on account.Authorizations
Your partner secret key, mk_live_… for real companies or mk_test_…
for test companies. Keep it on your servers. See
Authentication.
Path Parameters
The company's ID. Every company-scoped call works in exactly this company.
Body
application/json
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Response
The movement with its reconciliation.
Available options:
statement, connection An amount in euros as a decimal string with two decimals, such as "121.00".
Pattern:
^-?[0-9]+\.[0-9]{2}$Example:
"121.00"
Show child attributes
Show child attributes
Melso's proposed match, for a movement not reconciled yet. It needs the exact outstanding amount.
Show child attributes
Show child attributes