GeneraciĂłn por API - Liberaciones - Mercado Pago Developers
Recursos para IA

Crear reporte a través de la API

Crea el Reporte de Liberaciones manualmente tantas veces como desees o progrĂĄmalo segĂșn la frecuencia deseada a travĂ©s de nuestra API.

Configurar el Reporte de Liberaciones

Atributos configurables

Consulta los campos que puedes configurar para ajustar tus preferencias antes de empezar:

Importante
Configurar el atributo frequency no implica que el reporte se genere automĂĄticamente. La configuraciĂłn se aplicarĂĄ solo cuando se active la programaciĂłn automĂĄtica. Para obtener mĂĄs informaciĂłn, consulta la secciĂłn Programar reporte automĂĄticamente
Campo configurableTipoEjemploDescripciĂłn
columnsJSON Array[{"key": "DATE"}, {"key": "SOURCE_ID"}]Campo con los detalles de las columnas que se incluirĂĄn en tu reporte. Encuentra todos los valores posibles en la secciĂłn Glosario.
file_name_prefixString"conciliation-settlement-report"Prefijo que compone el nombre del reporte generado y listo para descargar.
frequencyJSON{"hour": 0, "type": "monthly", "value": 1}Indica la frecuencia diaria, semanal o mensual de los reportes programados.
- frequency: aplica type 'monthly' al dĂ­a del mes o 'weekly' al dĂ­a de la semana.
- hour: hora del dĂ­a en que se debe generar el reporte.
- type: indica el tipo de frecuencia: 'daily' (diaria), 'weekly' (semanal) y 'monthly' (mensual).
sftp_info (opcional)JSON{"server": "sftp.myserver.com", "password": "mypassword", "remote_dir": "/myfolder", "port": 22, "username": "myusername"}Proporciona los datos de conexiĂłn necesarios para acceder al servidor.
- server: URL o direcciĂłn IP (pĂșblica) del servidor.
- password: contraseña del usuario con el que estableceremos la conexión.
- remote_dir: carpeta donde depositaremos tus reportes.
- port: puerto utilizado para establecer la conexiĂłn.
- username: usuario con el que nos autenticaremos en tu servidor.
separator (opcional)String";"Separador alternativo para archivos csv cuando se desea utilizar un carĂĄcter diferente de la coma (',').
display_timezone (opcional)String"GMT-04"Este campo determina la fecha y la hora mostradas en los reportes. Si no configuras una zona horaria para este campo, el sistema considerarĂĄ la zona horaria GMT-04 como predeterminada. Si eliges una zona horaria que utiliza horario de verano, deberĂĄs ajustar manualmente cuando cambie la hora.
report_translation (opcional)String"es"Permite cambiar el idioma predeterminado de los encabezados de las columnas. Si estĂĄ activado, asegĂșrate de verificar si las integraciones con archivos Excel (xlsx) estĂĄn funcionando correctamente para permitir la conciliaciĂłn automĂĄtica. Si la integraciĂłn no funciona correctamente, actualĂ­zala utilizando los nuevos encabezados como referencia. Idiomas admitidos: en (inglĂ©s), es (español neutro), pt (portuguĂ©s).
notification_email_list (opcional)Array["example@email.com", "john@example.com"]Permite agregar un grupo de destinatarios de correo electrĂłnico para que reciban una notificaciĂłn cuando un reporte estĂ© listo y disponible para descargar. AsegĂșrate de incluir el correo electrĂłnico asociado a tu cuenta de Mercado Pago para que tambiĂ©n recibas las notificaciones.
include_withdrawal_at_end (opcional)BooleantrueEste campo indica si deben incluirse las transacciones de retiro realizadas al final del intervalo de fechas especificado en el reporte.
execute_after_withdrawal (opcional)BooleanfalseEste paråmetro controla si el reporte se ejecutarå después de que se realice un retiro.
scheduled (read_only)BooleantrueCampo informativo que indica si ya existen reportes programados en la cuenta del usuario. SerĂĄ 'true' si la generaciĂłn automĂĄtica estĂĄ activada, y 'false' si estĂĄ desactivada.
check_available_balance (opcional)BooleantrueSaldo antes y después de hacer una retirada, que explica el balance de la cuenta. (Esta configuración es meramente informativa. No debe considerarse como prueba de saldo y/o saldo de cuenta).
compensate_detail (opcional)BooleantrueBloqueo y desbloqueo de dinero que se compensan entre sĂ­ y que no afectan el saldo final. Ayuda a entender cĂłmo se realiza el balance final del reporte, en una lectura cronolĂłgica (recomendado si tienes un volumen alto de transacciones).

Puedes configurar tus reportes segĂșn sea necesario. A continuaciĂłn, destacamos las llamadas de la API disponibles para que puedas gestionar la configuraciĂłn de tu reporte y, posteriormente, en funciĂłn de esas configuraciones, generar los reportes.

Ten a mano el Glosario del Reporte de Liberaciones para consultarlo siempre que sea necesario o para verificar algĂșn tĂ©rmino tĂ©cnico.

Crear una nueva configuraciĂłn

Personaliza tus reportes asignando diferentes propiedades de creaciĂłn enviando un POST al endpoint Crear una nueva configuraciĂłn:

curl -X POST \
    'https://api.mercadopago.com/v1/account/release_report/config'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -d '{
  "columns": [
    {
      "key": "SOURCE_ID"
    }
  ],
  "file_name_prefix": "conciliation-settlement-report",
  "frequency": {
    "hour": 0,
    "value": 1,
    "type": "monthly"
  },
  "sftp_info": {
    "server": "sftp.myserver.com",
    "password": "mypassword",
    "remote_dir": "/myfolder",
    "port": 22,
    "username": "username"
  },
  "separator": ";",
  "display_timezone": "GMT-04",
  "report_translation": "es",
  "notification_email_list": [
    null
  ],
  "include_withdrawal_at_end": false,
  "check_available_balance": false,
  "compensate_detail": false,
  "execute_after_withdrawal": false,
  "scheduled": false
}'
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    '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, $data);
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());
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)
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);

En ausencia de errores, se emitirĂĄ un cĂłdigo de estado HTTP 201 (Created). La API responderĂĄ con una estructura JSON cuyas propiedades representarĂĄn la configuraciĂłn que has creado.

Respuesta

json

{
  "file_name_prefix": "release-report-USER_ID",
  "display_timezone": "GMT-04",
  "include_withdrawal_at_end": true,
  "scheduled": false,
  "execute_after_withdrawal": false,
  "columns": [
    {
      "key": "SOURCE_ID"
    }
  ],
  "report_translation": "es",
  "frequency": {
    "hour": 0,
    "value": 1,
    "type": "monthly"
  }
}

Consultar configuraciones

Consulta la configuraciĂłn actual de tus reportes enviando un GET al endpoint Consultar configuraciones:

curl -X GET \
    'https://api.mercadopago.com/v1/account/release_report/config'\
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    '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);
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());
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)
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);

En ausencia de errores, se emitirĂĄ un cĂłdigo de estado HTTP 200 (Ok). La API responderĂĄ con una estructura JSON cuyas propiedades representarĂĄn las caracterĂ­sticas de tus reportes.

json

{
  "file_name_prefix": "release-report-USER_ID",
  "notification_email_list": [
    {}
  ],
  "display_timezone": "GMT-04",
  "include_withdrawal_at_end": true,
  "scheduled": false,
  "execute_after_withdrawal": false,
  "columns": [
    {
      "key": "SOURCE_ID"
    }
  ],
  "report_translation": "es",
  "frequency": {
    "hour": 0,
    "value": 1,
    "type": "monthly"
  }
}

Actualizar configuraciones

Actualiza las configuraciones predeterminadas de tus reportes cuando sea necesario enviando un PUT al endpoint Actualizar configuraciones

Nota
Si, al actualizar la configuraciĂłn, deseas cambiar el atributo frequency y ya has activado la creaciĂłn automĂĄtica de tus reporte, sigue los siguientes pasos:

1. Cancela la creaciĂłn programada de tus reportes siguiendo los pasos descritos en la secciĂłn Desactivar creaciĂłn automĂĄtica en Programar reporte automĂĄticamente.
2. Actualiza la configuraciĂłn.
3. Vuelve a habilitar la creaciĂłn automĂĄtica de tus reportes siguiendo los pasos de la secciĂłn Activar creaciĂłn automĂĄtica en Programar reporte automĂĄticamente.
curl -X PUT \
    'https://api.mercadopago.com/v1/account/release_report/config'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -d '{
  "columns": [
    {
      "key": "SOURCE_ID"
    }
  ],
  "file_name_prefix": "conciliation-settlement-report",
  "frequency": {
    "hour": 0,
    "value": 1,
    "type": "monthly"
  },
  "sftp_info": {
    "server": "sftp.myserver.com",
    "password": "mypassword",
    "remote_dir": "/myfolder",
    "port": 22,
    "username": "username"
  },
  "separator": ";",
  "display_timezone": "GMT-04",
  "report_translation": "es",
  "notification_email_list": [
    null
  ],
  "include_withdrawal_at_end": false,
  "check_available_balance": false,
  "compensate_detail": false,
  "execute_after_withdrawal": false,
  "scheduled": false
}'
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    '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, $data);
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());
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)
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);

En ausencia de errores, se emitirĂĄ un cĂłdigo de estado HTTP 200 (Ok). La API responderĂĄ con una estructura JSON cuyas propiedades representarĂĄn la configuraciĂłn que has actualizado.

json

{
  "file_name_prefix": "release-report-USER_ID",
  "notification_email_list": [
    {}
  ],
  "display_timezone": "GMT-04",
  "include_withdrawal_at_end": true,
  "scheduled": false,
  "execute_after_withdrawal": false,
  "columns": [
    {
      "key": "SOURCE_ID"
    }
  ],
  "report_translation": "es",
  "frequency": {
    "hour": 0,
    "value": 1,
    "type": "monthly"
  }
}

Agendar reporte manualmente

Tienes a tu disposiciĂłn varios recursos que te permitirĂĄn interactuar con tus reportes manualmente.

Crear reporte

Realiza una solicitud POST al endpoint Crear reporte para generar manualmente un nuevo reporte dentro de un intervalo de fechas especĂ­fico:

curl -X POST \
    'https://api.mercadopago.com/v1/account/release_report'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -d '{
  "begin_date": "2019-05-01T00:00:00Z",
  "end_date": "2019-06-01T00:00:00Z"
}'
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    '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, $data);
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());
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)
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);

En ausencia de errores, se emitirå un código de estado HTTP 202 (Accepted). Después de esto, el reporte se generarå de forma asíncrona. Recibirås como respuesta una estructura JSON con información relevante a tu solicitud de creación.

Consultar reporte

Para explorar la lista de reportes que has generado, envĂ­a un GET al endpoint Consultar lista de reportes:

curl -X GET \
    'https://api.mercadopago.com/v1/account/release_report/list'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json'
);
$data = array(
    'access_token' => 'ENV_ACCESS_TOKEN'
);
$response = Requests::post('https://api.mercadopago.com/v1/account/release_report/list', $headers, $data);
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());
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)
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);

En ausencia de errores, se emitirĂĄ un cĂłdigo de estado HTTP 200 (Ok). La API responderĂĄ con una estructura JSON Array en la cual encontrarĂĄs el listado de todos los reportes que has generado.

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"
  }
]

Descargar reporte

Utilizando el atributo file_name, puedes descargar cualquiera de tus reportes al enviar un GET al endpoint Descargar reporte:

curl -X GET \
    'https://api.mercadopago.com/v1/account/release_report/REPORT_NAME'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json'
);
$data = array(
    'access_token' => 'ENV_ACCESS_TOKEN'
);
$response = Requests::post('https://api.mercadopago.com/v1/account/release_report/:file_name', $headers, $data);
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());
import requests

headers = {
    'Authorization': 'Bearer ENV_ACCESS_TOKEN'
}

response = requests.get('https://api.mercadopago.com/v1/account/release_report/:file_name', headers=headers)
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);

En ausencia de errores, se emitirĂĄ un cĂłdigo de estado HTTP 200 (Ok). En la respuesta del API tendrĂĄs a disposiciĂłn el archivo del reporte que solicitaste descargar.

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

Programar reporte automaticamente

Programa la generaciĂłn de tu reporte configurando dos instancias: activaciĂłn y desactivaciĂłn.

Activar generaciĂłn automĂĄtica

Programa la generaciĂłn automĂĄtica del reporte utilizando la frecuencia asignada durante la configuraciĂłn de tus reportes. Para eso, envĂ­a un POST al endpoint Activar generaciĂłn automĂĄtica. Al consumir este servicio, la propiedad scheduled de tu configuraciĂłn se actualizarĂĄ automĂĄticamente a true:

curl -X POST \
    'https://api.mercadopago.com/v1/account/release_report/schedule'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    '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);
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());
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)
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);

En ausencia de errores, se emitirĂĄ un cĂłdigo de estado HTTP 200 (Ok). La API responderĂĄ con una estructura JSON en la cual encontrarĂĄs informaciĂłn asociada al reporte que has programado.

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"
}

Desactivar generaciĂłn automĂĄtica

Puedes desactivar la generaciĂłn automĂĄtica de tus reportes en cualquier momento enviando un DELETE al endpoint Desactivar generaciĂłn automĂĄtica. Al consumir este servicio, la propiedad scheduled de tu configuraciĂłn se actualizarĂĄ automĂĄticamente a false.

curl -X DELETE \
    'https://api.mercadopago.com/v1/account/release_report/schedule'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    '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);
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());
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)
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);

En ausencia de errores, se emitirĂĄ un cĂłdigo de estado HTTP 200 (Ok). La API responderĂĄ con una estructura JSON en la cual encontrarĂĄs informaciĂłn asociada al reporte que has desactivado.

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"
}