# Query report generation task This endpoint allows you to query the status and details of a specific report generation task using its ID. The task is the action by which the creation of a report is requested and allows you to track its status. In case of success, the request will return a response with status 200. **GET** `/v1/account/settlement_report/task/{task-id}` ## Request parameters ### Path - `task-id` (integer, required) Unique identifier of the task. ### Query - `access_token` (string, required) OAuth access token. Example: APP_USR-3029_example ## Response parameters - `id` (integer, optional) Unique task ID. - `user_id` (integer, optional) ID of the owner user. - `begin_date` (string, optional) Start date and time of the report interval, in the UTC time zone (ISO 8601 format). - `end_date` (string, optional) End date and time of the report interval, in the UTC time zone (ISO 8601 format). - `created_from` (string, optional) Origin: 'manual' for manually generated reports or 'schedule' for scheduled reports. Possible enum values: - `manual` - `schedule` - `is_test` (boolean, optional) Indicates whether this is a test report. - `is_reserve` (boolean, optional) Indicates whether it includes reserve data. - `status` (string, optional) Current task status. Possible values: 'pending' (pending processing), 'processing' (in progress), 'processed' (successfully generated), 'failed' (processing error), 'deleted' (deleted). Possible enum values: - `pending` - `processing` - `processed` - `failed` - `deleted` - `report_type` (string, optional) Report type. For Account money reports, it will be 'settlement'. - `generation_date` (string, optional) Date and time when the report response was generated, in UTC timezone (ISO 8601 format). - `report_id` (integer, optional, nullable) Identifier of the generated report, if available. This field will be null if the status is 'pending' or 'processing'. - `last_modified` (string, optional) Date and time of the last modification to the report, in UTC timezone (ISO 8601 format). - `retries` (integer, optional) Number of attempts made to generate the report. - `sub_type` (string, optional, nullable) Report subtype. For Account money reports, this field will be null. - `account_id` (integer, optional) ID of the associated account. - `currency_id` (string, optional) ISO 4217 currency code used in the report. - `format` (string, optional) Format of the generated report. Possible values: 'CSV' or 'XLSX'. Possible enum values: - `CSV` - `XLSX` - `file_name` (string, optional, nullable) Name of the generated file. This field will only be present if the status is 'processed'. Otherwise, it will be null. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | invalid_parameter | The value informed for the 'task-id' parameter is invalid. Validate if the sent information is correct and try again. | | 401 | Invalid token | The Access Token is invalid for this request. Validate if the sent information is correct and try again. | | 404 | task_not_found_for_user | The task to which you are trying to access was not found for the user. Validate if the sent information is correct and try again. | | 500 | internal_error | Internal server error. Wait a few minutes and try again. | ## Request example ### cURL ```bash curl -X GET \ 'https://api.mercadopago.com/v1/account/settlement_report/task/{task-id}?access_token=' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' ``` ## Response example ```json { "id": 2222, "user_id": 574264905, "begin_date": "2022-10-01T00:00:00.000Z", "end_date": "2022-10-11T23:59:59.999Z", "created_from": "manual", "is_test": false, "is_reserve": true, "status": "processed", "report_type": "settlement", "generation_date": "2022-10-11T18:29:07.000Z", "report_id": 1, "last_modified": "2022-10-11T18:30:15.000Z", "retries": 0, "sub_type": null, "account_id": 574264905, "currency_id": "ARS", "format": "CSV", "file_name": "settlement-report-USER_ID-2022-10-11-182907.csv" } ```