Listening to Notifications enables you to have a real-time feed of the changes that occur on the different resources of the MercadoLibre API.

For example, if you listed an item and later it was paused, someone asked you a question, purchased your item or even paid for it and requested shipment, you will receive a Notification of a change on the resource.

Notifications are a very convenient way to stay up-to-date with everything important, in the most efficient way without having to query our API constantly. You only get notified of the resource that changes.

Table of Contents

How do I subscribe to the Notifications?

n the Applications Page where you created your App, you can edit the details and specify which ‘topic’ you will listen to (see Applications Page). If you haven’t created your App yet, go to the Creating your app section.

Notifications callback URL:

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: Comma separating the list of ‘topics’ you want to subscribe to.

Available Topics:

  • ordersTo get notified of any change on one of your orders. E.g.: you received an order from a purchase, the buyer added shipping instructions or the buyer added a payment to an order.
  • items – To get notified of any changes on an item you have published. E.g.: Due to MercadoLibre’s rules, your item is set to “under_review” the seller changes an item’s attribute (price, title, description) and all the applications subscribed to that seller’s feed get notified of the change; or the 60-day period of a listing has finished.
  • questions – To get notified of every question asked or answered.

NOTE: All the applications subscribed to the question feed will receive notifications for every answer the seller sends.

application-topics

Considerations when receiving notifications

  • 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?

orders

– Payment: The buyer adds a payment to the order.

– Shipping: There is new shipping information associated to the order or the status of the shipping is changed to: pending, handling, active, 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.

items

– Stock decrement: Somebody purchases one of your items and the stock is decremented. A new order is created.

– 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”

– 60 days passed and the listing expired: The status changes to “closed”

questions

– You receive a new question.

– You answer a question.

– You delete a question that you considered inappropriate.

Get the updated resource

After receiving a notification of one the topics, you need to make a GET to each resource to get the details

Orders

EXAMPLE:

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

RESPONSE:

{
    "user_id": 1234,
    "resource": "/orders/139876",
    "topic": "orders",
    "received": "2011-10-19T16:38:34.425Z",
    "sent" : "2011-10-19T16:40:34.425Z",
}

Items

EXAMPLE:

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

RESPONSE:

{
  "user_id": 1234,
  "resource": "/items/MLB139876",
  "topic": "items",
  "received": "2011-10-19T16:38:34.425Z",
  "sent" : "2011-10-19T16:40:34.425Z",
}

Questions

EXAMPLE:

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

RESPONSE:

{
  "user_id": 1234,
  "resource": "/questions/139876",
  "topic": "questions",
  "received": "2011-10-19T16:38:34.425Z",
  "sent" : "2011-10-19T16:40:34.425Z",
}

External Feed History API

With a simple GET to this API you can see a history of your apps notifications.

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"
    }
}
}

Please, rate this article