# Enable automatic generation Creates a daily, weekly, or monthly schedule to automatically generate Other Operations reports from an existing configuration, identified by its `structure_id`. In case of success, the request returns a response with status 201. **POST** `/v1/reporting/operations/{reportId}/schedule` ## Request parameters ### Path - `reportId` (string, required) Other Operations report type. - `type` (string, optional) Schedule configuration type. The only possible value is `frequency`. Possible enum values: - `frequency` Generates the report according to the frequency configured in `data`. - `data` (object, optional) Data that defines how often and at what time the report is generated. - `data.period` (string, optional) Frequency with which the report is generated. The possible values are: Possible enum values: - `daily` Generates the report every day. - `weekly` Generates the report every week. - `monthly` Generates the report every month. - `data.hour` (integer, optional) Hour at which the report will be generated, in 24-hour format. Values from 0 to 23 are accepted. - `data.value` (integer, optional) Numeric value that complements `period` in the frequency definition. Its interpretation depends on the configured period. - `structure_id` (string, optional) UUID of the report configuration for which the schedule will be created. - `notifiers` (array, optional) List of notifier UUIDs sent with the schedule request. Obtain these identifiers from the report configuration. ## Response parameters - `id` (string, optional) Unique identifier of the created schedule. - `status` (string, optional) Current status of the schedule. Possible enum values: - `active` The schedule is active and will generate reports according to the configured frequency. - `type` (string, optional) Schedule configuration type. Possible enum values: - `frequency` The report is generated according to the configured frequency. - `data` (object, optional) Frequency settings of the created schedule. - `data.period` (string, optional) Frequency with which the report is generated. Possible enum values: - `daily` Generates the report every day. - `weekly` Generates the report every week. - `monthly` Generates the report every month. - `data.hour` (integer, optional) Hour at which the report is generated, in 24-hour format. - `data.value` (integer, optional) Frequency value returned for the configured period. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | validation_error | One or more schedule fields are invalid. Use `frequency` as `type`, set `period` to `daily`, `weekly`, or `monthly`, provide an `hour` from 0 to 23, and send a valid `structure_id`. Then submit the request again. | | 404 | configuration_not_found | No configuration matches the specified `reportId` and `structure_id`. [Retrieve the active configuration](/developers/en/reference/reports/get-activity-report-configuration/get) and verify its identifier, or [create a configuration](/developers/en/reference/reports/create-activity-report-configuration/post) before scheduling the report. | | 409 | schedule_already_exists | An active schedule already exists for the report configuration. Keep the existing schedule, or [disable automatic generation](/developers/en/reference/reports/disable-automatic-generation/delete) before creating a new one. | ## Request example ### cURL ```bash curl -X POST \ 'https://api.mercadopago.com/v1/reporting/operations/{reportId}/schedule' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "frequency", "data": { "period": "daily", "hour": 0, "value": 1 }, "structure_id": "string", "notifiers": [ "11112222-aaaa-bbbb-cccc-333344445555" ] }' ``` ## Response example ```json { "id": "bd6d0d3c-7303-476b-a25a-4090036dcee8", "status": "active", "type": "frequency", "data": { "period": "daily", "hour": 6, "value": 1 } } ```