AI resources
Create a new configuration

Creates columns and delivery notifiers for an Other Operations report. In case of success, the request returns a response with status 201.

POST

https://api.mercadopago.com/v1/reporting/operations/{reportId}/config
Request parameters
Header
Authorization
string

REQUIRED

Access Token obtained through the developer panel. Must be sent in all requests.
Path
reportId
string

REQUIRED

Other Operations report type.
activities_collection: Collection report.
activities_after_collection: Post-collection report.
activities_withdraw: Withdrawal report.
Body
structure
object

REQUIRED

Report column structure.
notifiers
array

REQUIRED

List of notifiers used to communicate that the report is available or to deliver the generated file. Include at least one notifier and define its type and the corresponding connection data.
Response parameters
structure
object
Report structure created from the configuration request.
notifiers
array
Notifiers created and associated with the report structure.
Errors

400Invalid fields or malformed notifier.

validation_error

One or more configuration fields are invalid, or a notifier is malformed. Check the required fields and verify that data contains the attributes required for the selected notifier type, then submit the request again.

401Invalid access token.

invalid_token

The Access Token is invalid, expired, or does not have write permissions. Check the token sent in the Authorization header and its scopes, then submit the request again.

409A configuration already exists.

configuration_already_exists

An active configuration already exists for the specified reportId. Retrieve it with GET /config and update it with PUT /config/{structureId} instead of creating a new configuration.

Request
curl -X POST \
    'https://api.mercadopago.com/v1/reporting/operations/{reportId}/config'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer APP_USR-4*********782856-12*********f202ca494*********f0baa4bb3*********648' \
    -d '{
  "structure": {
    "name": "collections-structure",
    "columns": [
      {
        "key": "date_created"
      }
    ],
    "file_format": {
      "column_separator": ",",
      "decimal_separator": ".",
      "date_format": "yyyy-MM-dd",
      "name": "activities_collection",
      "prefix": "activities_"
    },
    "display_timezone": "GMT-05"
  },
  "notifiers": [
    {
      "data": {
        "server": "sftp.myserver.com",
        "port": 22,
        "username": "username",
        "password": "mypassword",
        "remote_dir": "/myfolder"
      },
      "description": "Webhook delivery"
    }
  ]
}'
Response
{
  "structure": {
    "id": "aaaabbbb-1111-2222-3333-ccccddddeeee",
    "name": "collections-structure",
    "columns": [
      {
        "key": "date_created"
      }
    ],
    "notifiers": [
      "11112222-aaaa-bbbb-cccc-333344445555"
    ],
    "scheduled": false,
    "version": 0
  },
  "notifiers": [
    {
      "id": "11112222-aaaa-bbbb-cccc-333344445555",
      "type": "webhook",
      "status": "ACTIVE",
      "version": 0
    }
  ]
}