# Create a new configuration This endpoint allows for the configuration of specific fields to customize preferences before initiating the report creation process. The settings will be applied in the generation of reports afterwards. Important: After creating the configuration, it will not be possible to use this endpoint to create a new one. To apply changes to the report configuration, update an existing configuration through the 'Update configurations' endpoint. In case of success, the request will return a response with status 200. **POST** `/v1/account/settlement_report/config` ## Request parameters - `columns` (array, optional) Field with the details of the columns to be included in the report. Find all possible values in the Glossary section (https://www.mercadopago.com/developers/en/docs/reports/account-money/report-fields). - `columns[].key` (string, optional) Name of the report column you wish to display. - `file_name_prefix` (string, optional) Prefix that composes the report name once generated and ready for download. It does not allow empty or null values. - `frequency` (object, optional) This field indicates the frequency with which the report should be generated, which can be daily, weekly, or monthly. - `frequency.hour` (number, optional) This field specifies the time at which the report will be generated, using the 24-hour format for its definition. - `frequency.value` (number, optional) This field defines the frequency at which the report is generated, either monthly or weekly, and its value complements the 'type' attribute. For example, if the frequency entered in 'type' is monthly ('monthly') and the value configured in this field is '1', it indicates that the report will be generated on the first day of each month. If the frequency entered in 'type' is daily ('daily'), the assigned value will be 0, and the time of day should be set in the 'hour' field. Whereas if the frequency entered in 'type' is weekly ('weekly'), the value configured in this field should be 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', or 'sunday' to determine the day of the week on which the report is generated, with the time of day to be defined in the 'hour' field. - `frequency.type` (string, optional) This field indicates the type of frequency: 'daily' (daily), 'weekly' (weekly), and 'monthly' (monthly). It is important to remember that this field communicates directly with the 'value' field described above. - `sftp_info` (object, optional) This field provides the necessary connection data for us to access your server. It is optional and should only be sent if you want to receive the reports via SFTP. - `sftp_info.server` (string, optional) URL or IP address (public) of the server. - `sftp_info.password` (string, optional) User password with which we will establish the connection. - `sftp_info.remote_dir` (string, optional) Folder where your reports will be saved. - `sftp_info.port` (number, optional) Port used to establish the connection. - `sftp_info.username` (string, optional) User with whom we will authenticate on your server. - `separator` (string, optional) Separator that you can use in the .csv file when you don't want the separator to be a comma. - `display_timezone` (string, optional) This field sets the date and time displayed in the reports. In the absence of a specific time zone configuration, the system defaults to GMT-04. For time zones subject to daylight saving time, manual adjustments will be necessary to reflect the time changes. - `report_translation` (string, optional) This field allows changing the default language of column headers. If activated, it is recommended to verify if integrations with Excel files (.xlsx), which allow automatic reconciliation, are working correctly. In case of integration failures, it is important to update the settings, using the new headers as a guide. Available languages include English ('en'), neutral Spanish ('es'), and Portuguese ('pt'). - `header_language` (string, optional) Allows changing the default report language. If enabled, we recommend verifying that Excel file (.xlsx) integrations work correctly. Available languages: English (en), Spanish (es), and Portuguese (pt). - `scheduled` (boolean, optional) 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. - `include_withdraw` (boolean, optional) Indicates whether movements associated with money withdrawal operations will be included in the report. - `refund_detailed` (boolean, optional) Indicates whether refund identification codes will be included in the report. - `shipping_detail` (boolean, optional) Includes shipping details. - `coupon_detailed` (boolean, optional) Includes discount coupon details. - `show_chargeback_cancel` (boolean, optional) Includes chargeback cancellation details. - `show_fee_prevision` (boolean, optional) Includes fee details. ## Response parameters - `file_name_prefix` (string, optional) Prefix that composes the report name once generated and ready for download, not allowing empty or null values. - `display_timezone` (string, optional) This field sets the date and time displayed in the reports. In the absence of a specific time zone configuration, the system defaults to GMT-04. For time zones subject to daylight saving time, manual adjustments will be necessary to reflect the time changes. - `scheduled` (boolean, optional) 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. - `columns` (array, optional) Field with the details of the columns to be included in the report. Find all possible values in the Glossary section (https://www.mercadopago.com/developers/en/docs/reports/account-money/report-fields). - `columns[].key` (string, optional) Name of the report column. - `report_translation` (string, optional) Allows changing the default report language. If enabled, we recommend verifying that Excel file (.xlsx) integrations work correctly. Available languages: English (en), Spanish (es), and Portuguese (pt). - `header_language` (string, optional) Allows changing the default report language. If enabled, we recommend verifying that Excel file (.xlsx) integrations work correctly. Available languages: English (en), Spanish (es), and Portuguese (pt). - `frequency` (object, optional) This field indicates the frequency with which the report should be generated, which can be daily, weekly, or monthly. - `frequency.hour` (number, optional) Hour at which the report will be generated, in 24-hour format. - `frequency.value` (number, optional) Defines the report periodicity and complements the "type" attribute. For example: if "type" is "monthly" and this value is "1", the report will be generated on the first day of each month. If "type" is "daily", the value should be 0. If "type" is "weekly", use day names ("monday", "tuesday", etc.). - `frequency.type` (string, optional) Frequency type: daily, weekly, or monthly. This field communicates directly with the "value" field. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | Invalid file_name_prefix | Invalid file name prefix. | | 400 | Invalid include_withdraw | Invalid include withdrawal execution. | | 400 | Invalid columns | Invalid columns. | | 400 | Invalid frequency | Invalid frequency. | | 400 | Invalid sftp info | Invalid SFTP info. | | 400 | Invalid webhook | Invalid webhook. | | 400 | Invalid file config | Invalid file config. | | 400 | Invalid report_language | Invalid report language. | | 401 | Invalid token | Invalid token. | | 409 | Duplicated id | The record already exists. | ## Request example ### cURL ```bash curl -X POST \ 'https://api.mercadopago.com/v1/account/settlement_report/config' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "columns": [ { "key": "EXTERNAL_REFERENCE" } ], "file_name_prefix": "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", "header_language": "es", "scheduled": false, "include_withdraw": true, "refund_detailed": true, "shipping_detail": true, "coupon_detailed": true, "show_chargeback_cancel": true, "show_fee_prevision": true }' ``` ## Response example ```json { "file_name_prefix": "settlement-report-USER_ID", "display_timezone": "GMT-04", "scheduled": false, "columns": [ { "key": "EXTERNAL_REFERENCE" } ], "report_translation": "es", "header_language": "es", "frequency": { "hour": 0, "value": 1, "type": "monthly" } } ```