BankStatement
)Os extratos devem ser acessados de maneira aninhada à conta (DepositAccount) à qual pertencem.
POST /entities/:entity_id/deposit_accounts/:deposit_account_id/bank_statements
Enviar o arquivo a ser importado (formato OFX ou OFC ou QIF) na requisição como multipart. Em caso de sucesso, retorna 201 Created mais o caminho para o objeto criado no header Location. Em caso de erro, retorna 422 Unprocessable entity e os eventuais erros.
GET /entities/:entity_id/deposit_accounts/:deposit_account_id/bank_statements/:id
Retorna 200 OK e os dados do extrato solicitado.
HTTP/1.1 200 OK
Date: Mon, 17 Jan 2011 20:29:57 GMT
Content-Type: application/json; charset=utf-8
{
"bank_statement": {
"id": 7,
"created_at": "2016-02-29T16:11:33-03:00",
"updated_at": "2016-02-29T16:11:33-03:00",
"file_file_name": "extrato.ofx",
"file_content_type": "application/octet-stream",
"file_file_size": 2261,
"file_updated_at": "2016-02-29T16:11:33-03:00",
"deposit_account_id": 6,
"future_items_ignored_count": 0,
"amount_zero_items_ignored_count": 0,
"invalid_date_items_ignored_count": 0,
"event": {
"id": 7,
"status": "success",
"output": "Foram importados 12 lançamentos",
"created_at": "2016-02-29T16:11:34-03:00",
"finished_at": "2016-02-29T16:12:32-03:00"
}
}
}
HTTP/1.1 200 OK
Date: Mon, 17 Jan 2011 20:29:57 GMT
Content-Type: application/xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<bank-statement>
<created-at type="dateTime">2011-07-14T17:55:02-03:00</created-at>
<deposit-account-id type="integer">1</deposit-account-id>
<event-id type="integer">1</event-id>
<file-content-type>application/octet-stream</file-content-type>
<file-file-name>zezin.ofc</file-file-name>
<file-file-size type="integer">2199</file-file-size>
<file-updated-at type="dateTime">2011-07-14T17:55:02-03:00</file-updated-at>
<future-items-ignored-count type="integer">0</future-items-ignored-count>
<id type="integer">1</id>
<updated-at type="dateTime">2011-07-14T17:55:02-03:00</updated-at>
</bank-statement>