Creates columns and delivery notifiers for an Other Operations report. In case of success, the request returns a response with status 201.
POST
REQUIRED
REQUIRED
REQUIRED
REQUIRED
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.
curl -X POST \
'https://api.mercadopago.com/v1/reporting/operations/{reportId}/config'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-1*********550113-12*********b4773884a*********e8df16347*********786' \
-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"
}
]
}'{
"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
}
]
}