# MD for: https://www.mercadopago.com.uy/developers/en/docs/adobe-commerce/additional-content/reports/released-money/api.md \# Generate report via API Generate the Releases report manually as many times as you want or schedule it according to the desired frequency through our API. ## Configure the Releases report ### Configurable attributes Check the fields you can configure to adjust your preferences before starting: > WARNING > > Important > > Configuring the \`frequency\` attribute does not mean that the report will be generated automatically. The configuration will only be applied when automatic scheduling is activated. For more information, see the section \[Schedule report automatically.\](#bookmark\_schedule\_report\_automatically) | Configurable field | Type | Example | Description | |---------------------------|------------|------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | \`columns\` | JSON Array | \`\`\` \[{"key": "DATE"}, {"key": "SOURCE\_ID"}\] \`\`\` | Field with details of the columns to be included in your report. Find all possible values in the \[Glossary\](https://www.mercadopago.com.uy/developers/en/docs/checkout-pro/additional-content/reports/released-money/report-use). | | \`file\_name\_prefix\` | String | "conciliation-settlement-report" | Prefix that composes the name of the generated and ready-to-download report. | | \`frequency\` | JSON | \`\`\` {"hour": 0, "type": "monthly", "value": 1} \`\`\` | Indicates the daily, weekly, or monthly frequency of scheduled reports. \- \`frequency\`: applies type 'monthly' to the day of the month or 'weekly' to the day of the week. \- \`hour\`: the time of day the report should be generated. \- \`type\`: indicates the type of frequency: 'daily' (daily), 'weekly' (weekly), and 'monthly' (monthly). | | \`sftp\_info\` (optional) | JSON | \`\`\` {"server": "sftp.myserver.com", "password": "mypassword", "remote\_dir": "/myfolder", "port": 22, "username": "myusername"} \`\`\` | Provides the necessary connection data to access the server. \- \`server\`: URL or IP address (public) of the server. \- \`password\`: password of the user with which we will establish the connection. \- \`remote\_dir\`: folder where we will deposit your reports. \- \`port\`: port used to establish the connection. \- \`username\`: user with which we will authenticate on your server. | | \`separator\` (optional) | String | ";" | Alternative separator for \_csv\_ files when a character other than a comma (',') is desired. | | \`display\_timezone\` (optional)| String | "GMT-04" | This field determines the date and time shown in the reports. If you do not configure a time zone for this field, the system will consider GMT-04 as the default time zone. If you choose a time zone that observes daylight saving time, you will need to manually adjust it when the time changes. | | \`report\_translation\` (optional)| String | "es" | Allows changing the default language of column headers. If enabled, it is recommended to check if Excel file (\_xlsx\_) integrations are working correctly to allow automatic reconciliation. If the integration is not working correctly, please update it using the new headers as a reference. Supported languages: en (English), es (Neutral Spanish), pt (Portuguese). | | \`notification\_email\_list\` (optional)| Array| \`\`\` \["example@email.com", "john@example.com"\] \`\`\` | Allows adding a group of email recipients to receive a notification when a report is ready and available for download. Make sure to include the email associated with your Mercado Pago account so you also receive the notifications. | | \`include\_withdrawal\_at\_end\` (optional)| Boolean | true | This field indicates whether withdrawal transactions made at the end of the specified date range in the report should be included. | | \`execute\_after\_withdrawal\` (optional)| Boolean | false | This parameter determines whether the report will be executed after a withdrawal is made. | | \`scheduled\` (read\_only) | Boolean | true | Informative field indicating whether there are already scheduled reports in the user's account. It will be 'true' if automatic generation is enabled, and 'false' if it is disabled. | | \`check\_available\_balance\` (optional)| Boolean| true | Balance before and after making a withdrawal, explaining the account balance. (This setting is purely informational. It should not be considered for proof of balance and/or account balance). | | \`compensate\_detail\` (optional)| Boolean | true | Blocking and unblocking of money that offset each other and do not affect the final balance. Helps understand how the final report balance is made, in a chronological format (recommended setting if you have a large volume of transactions). | You can configure your reports as needed. Below, we highlight the available API calls so you can manage the configuration of your report and, based on these settings, generate the reports. > Have the \[Glossary of the Releases Report\](https://www.mercadopago.com.uy/developers/en/guides/additional-content/reports/released-money/glossary) on hand for reference whenever needed or to check any technical terms. ### Create a new configuration Customize your reports by assigning different creation properties by sending a \*\*POST\*\* to the endpoint \[Create new configuration\](https://www.mercadopago.com.uy/developers/en/reference/releases-report/create-new-configuration/post): * [curl ](#editor%5F1) * [java ](#editor%5F3) * [node ](#editor%5F5) * [php ](#editor%5F2) * [python ](#editor%5F4) curl php java python node ``` curl -X POST \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ 'https://api.mercadopago.com/v1/account/release_report/config' \ -d '{ "file_name_prefix": "release-report-USER_ID", "include_withdrawal_at_end": true, "execute_after_withdrawal": false, "display_timezone": "GMT-04", "notification_email_list": [ "example@email.com", "john@example.com" ], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": [ { "key": "DATE" }, { "key": "SOURCE_ID" }, { "key": "EXTERNAL_REFERENCE" } ] }' ``` Copiar ``` 'application/json', 'content-type' => 'application/json', 'Authorization' => 'Bearer ENV_ACCESS_TOKEN' ); $data = '{ "file_name_prefix": "release-report-USER_ID", "include_withdrawal_at_end": true, "execute_after_withdrawal": false, "display_timezone": "GMT-04", "notification_email_list": [ "example@email.com", "john@example.com" ], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": [ { "key": "DATE" }, { "key": "SOURCE_ID" }, { "key": "EXTERNAL_REFERENCE" } ] }'; $response = Requests::post('https://api.mercadopago.com/v1/account/release_report/config', $headers, $data); ``` Copiar ``` URL url = new URL("https://api.mercadopago.com/v1/account/release_report/config"); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Authorization", "Bearer ENV_ACCESS_TOKEN"); connection.setDoOutput(true); String body = "{ \\"file_name_prefix\\": \\"release-report-USER_ID\\", \\"include_withdrawal_at_end\\": true, \\"execute_after_withdrawal\\": false, \\"display_timezone\\": \\"GMT-04\\", \\"notification_email_list\\": [ \\"example@email.com\\", \\"john@example.com\\", ], \\"frequency\\": { \\"hour\\": 0, \\"type\\": \\"monthly\\", \\"value\\": 1 }, \\"columns\\": [ { \\"key\\": \\"DATE\\" }, { \\"key\\": \\"SOURCE_ID\\" }, { \\"key\\": \\"EXTERNAL_REFERENCE\\" }, ] }"; try(OutputStream os = connection.getOutputStream()) { byte[] input = body.getBytes("utf-8"); os.write(input, 0, input.length); } System.out.println(connection.getResponseCode()); System.out.println(connection.getResponseMessage()); System.out.println(connection.getInputStream()); ``` Copiar ``` import requests headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' } data = '{ "file_name_prefix": "release-report-USER_ID", "include_withdrawal_at_end": true, "execute_after_withdrawal": false, "display_timezone": "GMT-04", "notification_email_list": [ "example@email.com", "john@example.com" ], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": [ { "key": "DATE" }, { "key": "SOURCE_ID" }, { "key": "EXTERNAL_REFERENCE" } ] }' response = requests.post('https://api.mercadopago.com/v1/account/release_report/config', headers=headers, data=data) ``` Copiar ``` var request = require('request'); var headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' }; var dataString = '{ "file_name_prefix": "release-report-USER_ID", "include_withdrawal_at_end": true, "execute_after_withdrawal": false, "display_timezone": "GMT-04", "notification_email_list": [ "example@email.com", "john@example.com" ], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": [ { "key": "DATE" }, { "key": "SOURCE_ID" }, { "key": "EXTERNAL_REFERENCE" } ] }'; var options = { url: 'https://api.mercadopago.com/v1/account/release_report/config', method: 'POST', headers: headers, body: dataString }; function callback(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } } request(options, callback); ``` Copiar In the absence of errors, an HTTP status code \`201 (Created)\` will be issued. The API will respond with a JSON structure, where the properties will represent the configuration you created. #### Response \`\`\`json { "file\_name\_prefix": "release-report-USER\_ID", "include\_withdrawal\_at\_end": true, "scheduled": false, "execute\_after\_withdrawal": false, "separator": ",", "display\_timezone": "GMT-04", "notification\_email\_list": \[ "example@email.com", "john@example.com" \], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": \[ { "key": "DATE" }, { "key": "SOURCE\_ID" }, { "key": "EXTERNAL\_REFERENCE" } \] } \`\`\` ### Check settings Check the current configuration of your reports by sending a \*\*GET\*\* to the endpoint \[Consult configurations\](https://www.mercadopago.com.uy/developers/en/reference/releases-report/consult-configurations/get): * [curl ](#editor%5F6) * [java ](#editor%5F8) * [node ](#editor%5F10) * [php ](#editor%5F7) * [python ](#editor%5F9) curl php java python node ``` curl -X GET \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ 'https://api.mercadopago.com/v1/account/release_report/config' \ ``` Copiar ``` 'application/json', 'content-type' => 'application/json', 'Authorization' => 'Bearer ENV_ACCESS_TOKEN' ); $response = Requests::get('https://api.mercadopago.com/v1/account/release_report/config', $headers); ``` Copiar ``` URL url = new URL("https://api.mercadopago.com/v1/account/release_report/config"); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Authorization", "Bearer ENV_ACCESS_TOKEN"); System.out.println(connection.getResponseCode()); System.out.println(connection.getResponseMessage()); System.out.println(connection.getInputStream()); ``` Copiar ``` import requests headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' } response = requests.get('https://api.mercadopago.com/v1/account/release_report/config', headers=headers) ``` Copiar ``` var request = require('request'); var headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' }; var options = { url: 'https://api.mercadopago.com/v1/account/release_report/config', headers: headers }; function callback(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } } request(options, callback); ``` Copiar In the absence of errors, an \`HTTP 200 (Ok)\` status code will be issued. The API will respond with a JSON structure whose properties will represent the characteristics of your reports. #### Response \`\`\`json { "file\_name\_prefix": "release-report-USER\_ID", "include\_withdrawal\_at\_end": true, "scheduled": false, "execute\_after\_withdrawal": false, "separator": ";", "display\_timezone": "GMT-04", "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": \[ { "key": "DATE" }, { "key": "SOURCE\_ID" }, { "key": "EXTERNAL\_REFERENCE" } \] } \`\`\` ### Update settings Update the default settings of your reports when necessary by sending a \*\*PUT\*\* to the endpoint \[Update configurations\](https://www.mercadopago.com.uy/developers/en/reference/releases-report/update-configurations/put). > NOTE > > Note > > If, when updating the configuration, you want to change the \`frequency\` attribute and have already activated the automatic creation of your reports, follow these steps: 1\. Cancel the scheduled creation of your reports by following the steps described in the section \*\*Disable automatic generation\*\* in \[Schedule report automatically.\](#bookmark\_schedule\_report\_automatically) 2\. Update the configuration. 3\. Re-enable the automatic creation of your reports by following the steps in the section \*\*Enable automatic generation\*\* in \[Schedule report automatically.\](#bookmark\_schedule\_report\_automatically) * [curl ](#editor%5F11) * [java ](#editor%5F13) * [node ](#editor%5F15) * [php ](#editor%5F12) * [python ](#editor%5F14) curl php java python node ``` curl -X PUT \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ 'https://api.mercadopago.com/v1/account/release_report/config' \ -d '{ "file_name_prefix": "release-report-USER_ID", "include_withdrawal_at_end": true, "execute_after_withdrawal": false, "display_timezone": "GMT-04", "notification_email_list": [ "example@email.com", "john@example.com" ], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": [ { "key": "DATE" }, { "key": "SOURCE_ID" }, { "key": "EXTERNAL_REFERENCE" } ] }' ``` Copiar ``` 'application/json', 'content-type' => 'application/json', 'Authorization' => 'Bearer ENV_ACCESS_TOKEN' ); $data = '{ "file_name_prefix": "release-report-USER_ID", "include_withdrawal_at_end": true, "execute_after_withdrawal": false, "display_timezone": "GMT-04", "notification_email_list": [ "example@email.com", "john@example.com" ], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": [ { "key": "DATE" }, { "key": "SOURCE_ID" }, { "key": "EXTERNAL_REFERENCE" } ] }'; $response = Requests::put('https://api.mercadopago.com/v1/account/release_report/config', $headers, $data); ``` Copiar ``` URL url = new URL("https://api.mercadopago.com/v1/account/release_report/config"); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setRequestMethod("PUT"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Authorization", "Bearer ENV_ACCESS_TOKEN"); connection.setDoOutput(true); String body = "{ \\"file_name_prefix\\": \\"release-report-USER_ID\\", \\"include_withdrawal_at_end\\": true, \\"execute_after_withdrawal\\": false, \\"display_timezone\\": \\"GMT-04\\", \\"notification_email_list\\": [ \\"example@email.com\\", \\"john@example.com\\", ], \\"frequency\\": { \\"hour\\": 0, \\"type\\": \\"monthly\\", \\"value\\": 1 }, \\"columns\\": [ { \\"key\\": \\"DATE\\" }, { \\"key\\": \\"SOURCE_ID\\" }, { \\"key\\": \\"EXTERNAL_REFERENCE\\" }, ] }"; try(OutputStream os = connection.getOutputStream()) { byte[] input = body.getBytes("utf-8"); os.write(input, 0, input.length); } System.out.println(connection.getResponseCode()); System.out.println(connection.getResponseMessage()); System.out.println(connection.getInputStream()); ``` Copiar ``` import requests headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' } data = '{ "file_name_prefix": "release-report-USER_ID", "include_withdrawal_at_end": true, "execute_after_withdrawal": false, "display_timezone": "GMT-04", "notification_email_list": [ "example@email.com", "john@example.com" ], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": [ { "key": "DATE" }, { "key": "SOURCE_ID" }, { "key": "EXTERNAL_REFERENCE" } ] }' response = requests.put('https://api.mercadopago.com/v1/account/release_report/config', headers=headers, data=data) ``` Copiar ``` var request = require('request'); var headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' }; var dataString = '{ "file_name_prefix": "release-report-USER_ID", "include_withdrawal_at_end": true, "execute_after_withdrawal": falsre, "display_timezone": "GMT-04", "notification_email_list": [ "example@email.com", "john@example.com" ], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": [ { "key": "DATE" }, { "key": "SOURCE_ID" }, { "key": "EXTERNAL_REFERENCE" } ] }'; var options = { url: 'https://api.mercadopago.com/v1/account/release_report/config', method: 'PUT', headers: headers, body: dataString }; function callback(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } } request(options, callback); ``` Copiar In the absence of errors, an \`HTTP 200 (Ok)\` status code will be issued. The API will respond with a JSON structure whose properties will represent the configuration you have updated. #### Response \`\`\`json { "file\_name\_prefix": "release-report-USER\_ID", "include\_withdrawal\_at\_end": true, "scheduled": false, "execute\_after\_withdrawal": false, "separator": ",", "display\_timezone": "GMT-04", "notification\_email\_list": \[ "example@email.com", "john@example.com" \], "frequency": { "hour": 0, "type": "monthly", "value": 1 }, "columns": \[ { "key": "DATE" }, { "key": "SOURCE\_ID" }, { "key": "EXTERNAL\_REFERENCE" } \] } \`\`\` ## Manually create report You have various resources at your disposal that will allow you to interact with your reports manually. ### Create report Make a \*\*POST\*\* request to the endpoint \[Create report\](https://www.mercadopago.com.uy/developers/en/reference/releases-report/create-report/post) to manually generate a new report within a specific date range: * [curl ](#editor%5F16) * [java ](#editor%5F18) * [node ](#editor%5F20) * [php ](#editor%5F17) * [python ](#editor%5F19) curl php java python node ``` curl -X POST \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ 'https://api.mercadopago.com/v1/account/release_report' \ -d '{ "begin_date": "2019-05-01T00:00:00Z", "end_date": "2019-06-01T00:00:00Z" }' ``` Copiar ``` 'application/json', 'content-type' => 'application/json', 'Authorization' => 'Bearer ENV_ACCESS_TOKEN' ); $data ='{ "begin_date": "2019-05-01T00:00:00Z", "end_date": "2019-06-01T00:00:00Z" }'; $response = Requests::post("https://api.mercadopago.com/v1/account/release_report", $headers, $data); ``` Copiar ``` URL url = new URL("https://api.mercadopago.com/v1/account/release_report"); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Authorization", "Bearer ENV_ACCESS_TOKEN"); connection.setDoOutput(true); String body = "{\\"begin_date\\":\\"2019-05-01T00:00:00Z\\",\\"end_date\\": \\"2019-06-01T00:00:00Z\\"}"; try(OutputStream os = connection.getOutputStream()) { byte[] input = body.getBytes("utf-8"); os.write(input, 0, input.length); } System.out.println(connection.getResponseCode()); System.out.println(connection.getResponseMessage()); System.out.println(connection.getInputStream()); ``` Copiar ``` import requests headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' } data = '{ "begin_date": "2019-05-01T00:00:00Z", "end_date": "2019-06-01T00:00:00Z" }' response = requests.post('https://api.mercadopago.com/v1/account/release_report', headers=headers, data=data) ``` Copiar ``` var request = require('request'); var headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' }; var dataString = '{ "begin_date": "2019-05-01T00:00:00Z", "end_date": "2019-06-01T00:00:00Z" }'; var options = { url: 'https://api.mercadopago.com/v1/account/release_report', method: 'POST', headers: headers, body: dataString }; function callback(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } } request(options, callback); ``` Copiar In the absence of errors, an HTTP status code of \`202 (Accepted)\` will be issued. After that, your report will be generated asynchronously. You will receive, as a response, a JSON structure with relevant information regarding your creation request. An HTTP status response of \`203 (Non-Authoritative Information)\` indicates that the request occurred as expected; however, it was not possible to create your report, and you will need to request it again with the dates indicated in the system. ### Query report Send a \*\*GET\*\* to the endpoint \[Consult report list\](https://www.mercadopago.com.uy/developers/en/reference/releases-report/consult-report/get) to explore the list of reports you have generated: * [curl ](#editor%5F21) * [java ](#editor%5F23) * [node ](#editor%5F25) * [php ](#editor%5F22) * [python ](#editor%5F24) curl php java python node ``` curl -G \ -H 'accept: application/json' \ -d 'access_token=ENV_ACCESS_TOKEN' \ 'https://api.mercadopago.com/v1/account/release_report/list' ``` Copiar ``` 'application/json' ); $data = array( 'access_token' => 'ENV_ACCESS_TOKEN' ); $response = Requests::post('https://api.mercadopago.com/v1/account/release_report/list', $headers, $data); ``` Copiar ``` URL url = new URL("https://api.mercadopago.com/v1/account/release_report/list"); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Authorization", "Bearer ENV_ACCESS_TOKEN"); System.out.println(connection.getResponseCode()); System.out.println(connection.getResponseMessage()); System.out.println(connection.getInputStream()); ``` Copiar ``` import requests headers = { 'accept': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' } response = requests.post('https://api.mercadopago.com/v1/account/release_report/list', headers=headers) ``` Copiar ``` var request = require('request'); var headers = { 'accept': 'application/json'}; var dataString = 'access_token=ENV_ACCESS_TOKEN'; var options = { url: 'https://api.mercadopago.com/v1/account/release_report/list', method: 'POST', headers: headers, body: dataString }; function callback(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } } request(options, callback); ``` Copiar In the absence of errors, an \`HTTP 200 (Ok)\` status code will be issued. The API will respond with a JSON Array in which you will find the list of all the reports it generated. #### Response \`\`\`json \[ { "id": 99336983670, "account\_id": 167345291, "begin\_date": "2022-08-01T03:00:00Z", "created\_from": "manual", "currency\_id": "ARS", "end\_date": "2022-08-08T02:59:59Z", "generation\_date": "2024-02-16T15:55:22.258-04:00", "internal\_management": \[ { "is\_visible": true, "notify": false, "use\_exact\_time": true } \], "is\_reserve": false, "is\_test": false, "last\_modified": "2024-02-16T15:55:22.261-04:00", "report\_id": 17012160, "retries": 0, "status": "processed", "sub\_type": "release", "user\_id": 123456789, "format": "CSV" } \] \`\`\` ### Download report Using the \`file\_name\` attribute, you can download any of your reports by sending a \*\*GET\*\* to the endpoint \[Download report\](https://www.mercadopago.com.uy/developers/en/reference/releases-report/download-report/get): * [curl ](#editor%5F26) * [java ](#editor%5F28) * [node ](#editor%5F30) * [php ](#editor%5F27) * [python ](#editor%5F29) curl php java python node ``` curl -X GET \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ 'https://api.mercadopago.com/v1/account/release_report/:file_name' ``` Copiar ``` 'application/json' ); $data = array( 'access_token' => 'ENV_ACCESS_TOKEN' ); $response = Requests::post('https://api.mercadopago.com/v1/account/release_report/:file_name', $headers, $data); ``` Copiar ``` URL url = new URL("https://api.mercadopago.com/v1/account/release_report/:file_name"); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Authorization", "Bearer ENV_ACCESS_TOKEN"); System.out.println(connection.getResponseCode()); System.out.println(connection.getResponseMessage()); System.out.println(connection.getInputStream()); ``` Copiar ``` import requests headers = { 'Authorization': 'Bearer ENV_ACCESS_TOKEN' } response = requests.get('https://api.mercadopago.com/v1/account/release_report/:file_name', headers=headers) ``` Copiar ``` var request = require('request'); var headers = { 'Authorization': 'Bearer ENV_ACCESS_TOKEN' }; var options = { url: 'https://api.mercadopago.com/v1/account/release_report/:file_name', headers: headers, }; function callback(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } } request(options, callback); ``` Copiar In the absence of errors, an HTTP status code \`200 (Ok)\` will be issued. In the API response, you will have the requested report file available for download. #### Response \`\`\`csv DATE,SOURCE\_ID,EXTERNAL\_REFERENCE,RECORD\_TYPE,DESCRIPTION,NET\_CREDIT\_AMOUNT,NET\_DEBIT\_AMOUNT,GROSS\_AMOUNT,MP\_FEE\_AMOUNT,FINANCING\_FEE\_AMOUNT,SHIPPING\_FEE\_AMOUNT,TAXES\_AMOUNT,COUPON\_AMOUNT,INSTALLMENTS,PAYMENT\_METHOD 2018-04-17T15:07:53.000-04:00,,,initial\_available\_balance,,813439.19,0.00,813439.19,0.00,0.00,0.00,0.00,0.00,1, 2018-04-17T15:07:53.000-04:00,,,release,withdrawal,0.00,813363.45,-813360.45,-3.00,0.00,0.00,0.00,0.00,1, 2018-04-17T15:11:12.000-04:00,,,release,payment,225.96,0.00,269.00,-43.04,0.00,0.00,0.00,0.00,1,account\_money 2018-04-17T15:18:16.000-04:00,,,release,payment,124.32,0.00,148.00,-23.68,0.00,0.00,0.00,0.00,1,visa 2018-04-17T15:38:40.000-04:00,,,release,payment,820.14,0.00,1099.00,-278.86,0.00,0.00,0.00,0.00,6,visa 2018-04-17T15:38:40.000-04:00,,,release,payment,850.00,0.00,850.00,0.00,0.00,0.00,0.00,0.00,1,account\_money \`\`\` ## Schedule report automatically Create your reports on a scheduled basis by configuring two instances: activation and deactivation. ### Activate automatic generation Schedule the automatic generation of the report using the frequency assigned during the configuration of your reports. To do so, send a \*\*POST\*\* to the endpoint \[Enable automatic generation\](https://www.mercadopago.com.uy/developers/en/reference/releases-report/enable-automatic-generation/post). When using this service, the \`scheduled\` property of your configuration will be automatically updated to \`true\`: * [curl ](#editor%5F31) * [java ](#editor%5F33) * [node ](#editor%5F35) * [php ](#editor%5F32) * [python ](#editor%5F34) curl php java python node ``` curl -X POST \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ 'https://api.mercadopago.com/v1/account/release_report/schedule' ``` Copiar ``` 'application/json', 'content-type' => 'application/json', 'Authorization' => 'Bearer ENV_ACCESS_TOKEN' ); $response = Requests::post('https://api.mercadopago.com/v1/account/release_report/schedule', $headers); ``` Copiar ``` URL url = new URL("https://api.mercadopago.com/v1/account/release_report/schedule"); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Authorization", "Bearer ENV_ACCESS_TOKEN"); System.out.println(connection.getResponseCode()); System.out.println(connection.getResponseMessage()); System.out.println(connection.getInputStream()); ``` Copiar ``` import requests headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' } response = requests.post('https://api.mercadopago.com/v1/account/release_report/schedule', headers=headers) ``` Copiar ``` var request = require('request'); var headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' }; var options = { url: 'https://api.mercadopago.com/v1/account/release_report/schedule', method: 'POST', headers: headers }; function callback(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } } request(options, callback); ``` Copiar In the absence of errors, an HTTP status code \`200 (OK)\` will be issued. The API will respond with a JSON structure in which you will find information associated with the scheduled report. #### Response \`\`\`json { "id": 99336983670, "account\_id": 167345291, "begin\_date": "2022-08-01T03:00:00Z", "created\_from": "schedule", "currency\_id": "ARS", "end\_date": "2022-08-08T02:59:59Z", "generation\_date": "2024-02-16T15:55:22.258-04:00", "internal\_management": \[ { "is\_visible": true, "notify": false, "use\_exact\_time": true } \], "is\_reserve": false, "is\_test": false, "last\_modified": "2024-02-16T15:55:22.261-04:00", "report\_id": 17012160, "retries": 0, "status": "processed", "sub\_type": "release", "user\_id": 123456789, "format": "CSV" } \`\`\` ### Disable automatic generation You can disable the automatic generation of your reports at any time by sending a \*\*DELETE\*\* to the endpoint \[Disable automatic generation\](https://www.mercadopago.com.uy/developers/en/reference/releases-report/disable-automatic-generation/delete). When using this service, the \`scheduled\` property in your configuration will be automatically updated to \`false\`. * [curl ](#editor%5F36) * [java ](#editor%5F38) * [node ](#editor%5F40) * [php ](#editor%5F37) * [python ](#editor%5F39) curl php java python node ``` curl -X DELETE \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ 'https://api.mercadopago.com/v1/account/release_report/schedule' ``` Copiar ``` 'application/json', 'content-type' => 'application/json', 'Authorization' => 'Bearer ENV_ACCESS_TOKEN' ); $response = Requests::delete('https://api.mercadopago.com/v1/account/release_report/schedule', $headers); ``` Copiar ``` URL url = new URL("https://api.mercadopago.com/v1/account/release_report/schedule"); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setRequestMethod("DELETE"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Authorization", "Bearer ENV_ACCESS_TOKEN"); System.out.println(connection.getResponseCode()); System.out.println(connection.getResponseMessage()); System.out.println(connection.getInputStream()); ``` Copiar ``` import requests headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' } response = requests.delete('https://api.mercadopago.com/v1/account/release_report/schedule', headers=headers) ``` Copiar ``` var request = require('request'); var headers = { 'accept': 'application/json', 'content-type': 'application/json', 'Authorization': 'Bearer ENV_ACCESS_TOKEN' }; var options = { url: 'https://api.mercadopago.com/v1/account/release_report/schedule', method: 'DELETE', headers: headers }; function callback(error, response, body) { if (!error && response.statusCode == 200) { console.log(body); } } request(options, callback); ``` Copiar In the absence of errors, an HTTP status code \`200 (OK)\` will be issued. The API will respond with a JSON structure in which you will find information associated with the report you deactivated. #### Response \`\`\`json { "id": 99336983670, "account\_id": 167345291, "begin\_date": "2022-08-01T03:00:00Z", "created\_from": "schedule", "currency\_id": "ARS", "end\_date": "2022-08-08T02:59:59Z", "generation\_date": "2024-02-16T15:55:22.258-04:00", "internal\_management": \[ { "is\_visible": true, "notify": false, "use\_exact\_time": true } \], "is\_reserve": false, "is\_test": false, "last\_modified": "2024-02-16T15:55:22.261-04:00", "report\_id": 17012160, "retries": 0, "status": "deleted", "sub\_type": "release", "user\_id": 123456789, "format": "CSV" } \`\`\`