Actualizar un extracto
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/bank_statements/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"bank_statement": {
"opening_balance": 123,
"closing_balance": 123
}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({bank_statement: {opening_balance: 123, closing_balance: 123}})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/bank_statements/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/bank_statements/{id}"
payload = { "bank_statement": {
"opening_balance": 123,
"closing_balance": 123
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"payload": {
"id": 123,
"reference": "<string>",
"bank_id": "<string>",
"bank_name": "<string>",
"format": "<string>",
"status": "<string>",
"period_start_on": "2023-12-25",
"period_end_on": "2023-12-25",
"credits_amount": 123,
"debits_amount": 123,
"lines_count": 123,
"auto_matched_count": 123,
"imported_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"bank_account_id": 123,
"account_name": "<string>",
"opening_balance": 123,
"import": {
"persisted_count": 123,
"skipped_duplicates": 123,
"debits_persisted_count": 123
},
"lines": [
{
"id": 123,
"posted_on": "2023-12-25",
"amount": 123,
"currency": "<string>",
"kind": "<string>",
"description": "<string>",
"bank_reference": "<string>",
"status": "<string>",
"payment_id": 123,
"subscription_id": 123,
"billing_cycle_id": 123,
"candidates": [
{}
],
"payout_id": 123,
"ledger_line_id": 123,
"movement": {},
"adjustment_kind": "<string>",
"match_rule": "<string>"
}
],
"balance": {
"currency": "<string>",
"opening_balance_cents": 123,
"book_balance_cents": 123,
"difference_cents": 123,
"pending_count": 123,
"adjustments": {}
},
"confirmed_count": 123
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Treasury Bank Statements
Actualizar un extracto
Fija el saldo inicial y el saldo final que reporta el banco. Un extracto conciliado no se deja cambiar.
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
treasury
/
bank_statements
/
{id}
Actualizar un extracto
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/bank_statements/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"bank_statement": {
"opening_balance": 123,
"closing_balance": 123
}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({bank_statement: {opening_balance: 123, closing_balance: 123}})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/bank_statements/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/bank_statements/{id}"
payload = { "bank_statement": {
"opening_balance": 123,
"closing_balance": 123
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"payload": {
"id": 123,
"reference": "<string>",
"bank_id": "<string>",
"bank_name": "<string>",
"format": "<string>",
"status": "<string>",
"period_start_on": "2023-12-25",
"period_end_on": "2023-12-25",
"credits_amount": 123,
"debits_amount": 123,
"lines_count": 123,
"auto_matched_count": 123,
"imported_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"bank_account_id": 123,
"account_name": "<string>",
"opening_balance": 123,
"import": {
"persisted_count": 123,
"skipped_duplicates": 123,
"debits_persisted_count": 123
},
"lines": [
{
"id": 123,
"posted_on": "2023-12-25",
"amount": 123,
"currency": "<string>",
"kind": "<string>",
"description": "<string>",
"bank_reference": "<string>",
"status": "<string>",
"payment_id": 123,
"subscription_id": 123,
"billing_cycle_id": 123,
"candidates": [
{}
],
"payout_id": 123,
"ledger_line_id": 123,
"movement": {},
"adjustment_kind": "<string>",
"match_rule": "<string>"
}
],
"balance": {
"currency": "<string>",
"opening_balance_cents": 123,
"book_balance_cents": 123,
"difference_cents": 123,
"pending_count": 123,
"adjustments": {}
},
"confirmed_count": 123
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Was this page helpful?