Receive notifications

Some events occur on MercadoLibre’s side and notifications are the only way to become aware of them.
Receiving notifications enables you to have a real-time feed of the changes that occur on the different resources of our API.
For example, if you listed an item that was then paused, if someone asked a question, if they bought an item, or even if they paid it and/or requested shipment.
An efficient way with no need to continuously query our API!

Contents:

Subscribe to notifications

If you want to start receiving notifications you need to go to our application manager, where you first created your app, and edit the details and specify the topics you will listen to.
Note: If you haven’t created your App yet, go to the Creating your app section.

topicsconmensajeria

– Callback URL de Notificaciones: Configure the public URL of your domain where you want to receive notifications for the different topics. E.g.: “http://myshoes-app.com/callbacks”.

– Topics: Select among different topics to receive their notifications.
Explanatory note: Topics orders, created_orders, payments and messaging are not user for real state, vehicles and services.

Available Topics

  • items – To get notified of any changes on an item you have published.

  • orders – To get notified of any changes to any of our confirmed sales.

  • created_orders – To get notified of your recently created sales when they are entered through the mandatory Mercado Pago flow.
    You will only get product data and number of units, since the purchase has not been confirmed yet. You should not take any action until it changes to “paid.”
    This is only to reserve stock, because if the buyer pays but the item is out of stock, the payment is automatically returned and the sale is canceled.
    Explanatory note: Once the order is paid, notifications are sent just like in “orders;” thus, we suggest choosing only one of the topics to avoid duplicated events.

  • questions – To get notified of all questions asked or answered.

  • payments – To get notified when a payment is created on an order, or when its status changes.

  • pictures – To get notified only of images which cannot be displayed due to errors.
    Note: Meanwhile, an automatic e-mail grouping the faulty images will be sent to the seller.

  • messaging – The topic will inform the subscriber of new messages created with his/her user_id as receiver.

Considerations

  • Messages will be sent out and retried for a period of 12 hours. After that period, if not accepted by the app, they will be discarded.
  • Since we will send a POST to your URL, your application must acknowledge the reception with an HTTP status code 200, otherwise the message will be considered undelivered and it will be retried.
  • Your application must send a response within 20 seconds, otherwise it will timeout and be considered undelivered and will retry.

What events trigger notifications?

items

  • Changes on any of the attributes.
  • Changes on the status: The listing has to be reviewed by an operator and the status is changed to “under_review” or it is paused and the status is changed to “paused”.

orders

  • Stock decrement: Somebody purchases one of your items and the stock is decremented. A new order is created.
  • Pago: The buyer adds a payment order.
  • Shipping: There is new shipping information associated with the order or the shipping status which changes to: pending, ready to print, in transit, delivered, not delivered.
  • Feedback: The buyer rates you as a seller or you send feedback to the buyer. A feed is received on the order.
  • Explanatory note: while “orders” is made up of blocks of other APIs, not every data is displayed, as not all of them are required. These separate blocks may have changes, which triggers events and subsequent notifications related to the order, though sometimes there is no evident change from the previous JSON.

created_orders

  • A created_orders notification will be received when an order entered through the mandatory Mercado Pago flow is created. This is only to reserve stock.
  • Once the order is “paid,” all notifications are the same as those in the “orders” topic. If both topics are selected, you will receive notifications from both of them.

questions

  • You receive a new question.
  • You answer a question.
  • You delete a question that you considered inappropriate.

payments

  • A payment is generated.
  • Payment status changes.

pictures

  • When an image failed to be displayed due to errors.

messaging

  • Each new message getting into the platform will post a topic to be informed to the subscriber.
  • When sending messages.
  • When there are messages read.



Explanatory Note: In case you receive duplicate notifications, bear in mind that there are internal events that are not visible to the integrator, but that trigger notifications.

Get the details

After receiving a notification of one topic, you’ll need to make a GET to the resource to get the details and then, if you stored the previous Json, compare both.

items

Notification response:

{
   "resource": "/items/MLA686791111",
   "user_id": 123456789,
   "topic": "items",
   "application_id": 2069392825111111,
   "attempts": 1,
   "sent": "2017-10-09T13:44:33.006Z",
   "received": "2017-10-09T13:44:32.984Z"
}

This information will help you make a GET to the items resource:

curl -X GET https://api.mercadolibre.com/items/{Item_id}?access_token=ACCESS_TOKEN


orders

Notification response:

{
   "resource": "/orders/1499111111",
   "user_id": 123456789,
   "topic": "orders",
   "application_id": 2069392825111111,
   "attempts": 1,
   "sent": "2017-10-09T13:58:23.347Z",
   "received": "2017-10-09T13:58:23.329Z"
}

created_orders

Notification response:

{
   "resource": "/orders/1499111111",
   "user_id": 123456789,
   "topic": "created_orders",
   "application_id": 2069392825111111,
   "attempts": 1,
   "sent": "2017-10-09T13:49:46.519Z",
   "received": "2017-10-09T13:49:46.531Z"
}

This information will help you make a GET to the orders resource:

curl -X GET https://api.mercadolibre.com/orders/{Order_id}?access_token=ACCESS_TOKEN


questions

Notification response:

{
   "resource": "/questions/5036111111",
   "user_id": "123456789",
   "topic": "questions",
   "application_id": 2069392825111111,
   "attempts": 1,
   "sent": "2017-10-09T13:51:05.464Z",
   "received": "2017-10-09T13:51:05.438Z"
}

This information will help you make a GET to the questions resource:

curl -X GET https://api.mercadolibre.com/questions/{Question_id}?access_token=ACCESS_TOKEN



You should identify why the image failed to be correctly processed. See “considerations and best practices working with pictures”.

payments

Notification response:

{
   "resource": "/collections/3043111111",
   "user_id": 123456789,
   "topic": "payments",
   "application_id": 2069392825111111,
   "attempts": 1,
   "sent": "2017-10-09T13:58:22.081Z",
   "received": "2017-10-09T13:58:22.061Z"
}

This information will help you make a GET to the collections resource:

curl -X GET https://api.mercadolibre.com/collections/{Payment_id}?access_token=ACCESS_TOKEN


messaging

Notification response:

{
 	"resource": "3f6da1e35ac84f70a24af7360d24c7bc",
 	"user_id": "268897726",
 	"topic": "messages",
 	"application_id": 2219612378080430,
 	"attempts": 1,
 	"sent": "2017-08-17T12:59:44.164Z",
 	"received": "2017-08-17T12:59:44.131Z"
 }

This information will help you make a GET to the collections messaging:

curl -X GET https://api.mercadolibre.com/messages/{RESOURCE}?access_token=ACCESS_TOKEN

Test your notices

You can validate if you are receiving notices in your integration importing the following link in Postman.
If your URL works well, you will be receiving code 200 status ok as an answer as shown in the following image.

Feed History API

We keep a track of your notifications history and you can get it anytime by calling our feeds resource.
Example:

curl -X GET https://api.mercadolibre.com/myfeeds?app_id={App_id}

Response:

{
  "messages": [
  {
    "_id": "123aaa456bbb789ccc",
    "application_id": "1234",
    "user_id": "123456789",
    "resource": "/orders/12345678",
    "topic": "orders",
    "sent": "2014-10-24T11:00:00.836Z",
    "received": "2014-10-24T11:00:00.836Z",
    "attempts": "2",
    "http_code": "400",
    "created_at": "2014-10-24T11:00:00.836Z"
  }
}
}



Note: Bear in mind that 10 notices will be displayed by default, but you can use LIMIT and OFFSET to change the number that you want to receive, as shown below:

https://api.mercadolibre.com/myfeeds?app_id=(APP_ID)&offset=1&limit=5

Next:
Manage feedback.

Please rate this