• 0
Sign in to follow this  
fsolari

New Feedback API

Question

Overview
 
After completing a sale and a purchase, according to MercadoLibre's rules, both parties must provide feedback about the transaction (order). This feedback says whether the order has been fulfilled or not and both the seller and buyer rate each other. Seller's and buyer's scores on the MercadoLibre platform are calculated based on these ratings.

Important: Note that we're including the parameter version=3.0 in the url. This will be mandatory to use the new Feedback API during a 3 month adaptation period, deadline: October 28, when the previous version of the API wont be available anymore.

 

Post feedback
To send feedback to an order, make a POST to the order like this:

curl -X POST -H "Content-Type: application/json" -d
'{
  "fulfilled": false,
  "rating": "neutral",
  "message": "Operation not completed",
  "reason": "THEY_DIDNT_ANSWER",
  "restock_item": true,
  "has_seller_refunded_money": false
}'
 
"https://api.mercadolibre.com/orders/{order_Id}/feedback?version=3.0&access_token=$ACCESS_TOKEN"

Reply
You can reply to the feedback you got from the other party in order to explain your reasons or give additional information by making a POST to the API, including their feedback_id like in the following example:

curl -X POST -H "Content-Type: application/json" -d'{
"reply":"COMMENT 2."
}' "https://api.mercadolibre.com/feedback/{feedback_Id}/reply?version=3.0&access_token=$ACCESS_TOKEN"

How do I know the other party feedback Id?
This is very easy, just make a GET to orders:

curl -X GET "https://api.mercadolibre.com/orders/{order_Id}&access_token=$ACCESS_TOKEN"

RESPONSE:

{
"id": 825103323,
"status": "confirmed",
"status_detail": {
"code": null,
"description": null
},
"date_created": "2014-03-17T23:27:53.000-04:00",
"date_closed": "2014-03-17T23:27:53.000-04:00",
"last_updated": "2014-06-01T16:36:28.000-04:00",
"order_items": [
{
"item": {
"id": "MLA494467937",
"title": "Tag Heuer Aquaracer Automatico 43mm Cal16 Day-d Linea Nueva",
"variation_id": null,
"variation_attributes": []
},
"quantity": 1,
"unit_price": 24100,
"currency_id": "ARS"
}
],
"total_amount": 24100,
"currency_id": "ARS",
"buyer": {
"id": 9981145,
"nickname": "CARLITOS8665",
"email": "carlitos8665@gmail.com",
"phone": {
"area_code": "011",
"number": "1544706706",
"extension": null
},
"alternative_phone": {
"area_code": "011",
"number": "48027618",
"extension": null
},
"first_name": "Carlos",
"last_name": "Acuña",
"billing_info": {
"doc_type": null,
"doc_number": null
}
},
"seller": {
"id": 114499680,
"nickname": "WATCHES-LUXURY2",
"email": "watches-luxury2@hotmail.com",
"phone": {
"area_code": null,
"number": "( 011) 1552490473",
"extension": null
},
"alternative_phone": {
"area_code": null,
"number": "",
"extension": null
},
"first_name": "carolina soledad",
"last_name": "casares"
},
"payments": [],
"feedback": {
"purchase": {
"id": 5040068164512,
"date_created": "2014-04-07T11:20:00.000-04:00",
"fulfilled": true,
"rating": "positive",
"status": "active"
},
"sale": {
"id": 5040068160032,
"date_created": "2014-04-07T11:20:57.000-04:00",
"fulfilled": true,
"rating": "neutral",
"status": "active"
}
},
"shipping": {
"status": "to_be_agreed"
},
"tags": [
"paid",
"not_delivered"
],
"mediations": [],
"application_id": "2568868276694852",
"hidden_for_seller": false,
"buying_mode": "buy_it_now"
}

You'll find a feedback_id for each experience: sale and purchase. In this test example, "id": 5040103892781 it's the feedback_id for the sale experience, while "id": 5040103885872 it's for the purchase experience.

 

Change feedback
In case you want to change the feedback, you've already learned how to GET the other party feedback ID, so now you just have make a PUT to the API like this:

curl -X PUT -H "Content-Type: application/json" -d '{
  "fulfilled": true,
  "rating": "positive",
  "message": "It’s ok.",
}' "https://api.mercadolibre.com/feedback/{feedback_id}?version=3.0&access_token=$ACCESS_TOKEN"

Another way to do this it's by making a PUT to the order specifying the experience in the url, like in the following examples.

https://api.mercadolibre.com/orders/{order_id}/feedback/$EXPERIENCE?version=3.0&access_token=$ACCESS_TOKEN

A seller will add the parameter sale to the url:

curl -X PUT -H "Content-Type: application/json" -d '{
  "fulfilled": false,
  "rating": "neutral",
  "message": "fine",
  "reason": "THEY_DIDNT_ANSWER"
}' "https://api.mercadolibre.com/orders/{order_id}/feedback/sale?version=3.0&access_token=$ACCESS_TOKEN" 

While a buyer will do exactly the same, but adding purchase:

curl -X PUT -H "Content-Type: application/json" -d '{
  "fulfilled": false,
  "rating": "neutral",
  "message": "fine",
  "reason": "THEY_DIDNT_ANSWER"
}' "https://api.mercadolibre.com/orders/{order_id}/feedback/purchase?version=3.0&access_token=$ACCESS_TOKEN"

For further information, please check New Feedback API Tutorial.

Share this post


Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Hello everyone, there's no need to send de parameter version for any API anymore.

We will consider your recommendations next time we need to work with parallel API versions.

This is not usual with the APIs, it was a one time situation where we kept the two versions working to give you time to adapt your apps to work with the current version.

Share this post


Link to post
Share on other sites
  • 0

Hi,

 

Is 3.0 the new API version or the version from which migration is happening ?

( Which is the previous version here 3.0 ?)

 

Also hope there wont be any change in the API request and response format post Oct 28th ?

 

Thanks for the help,

akng

Share this post


Link to post
Share on other sites
  • 0

Hello akgn:

3.0 is the new API version. There been some minor changes in the request and response of the API if you compare the previous documentation with the new one.

 

 

IMPORTANT:

Please note that, as stated before, we're sending the parameter version=3.0 in the url right now. 

For example:

 

NOW:

curl -X PUT -H "Content-Type: application/json" -d '{
  "fulfilled": true,
  "rating": "positive",
  "message": "It’s ok.",
}' "https://api.mercadolibre.com/feedback/{feedback_id}?version=3.0&access_token=$ACCESS_TOKEN"

This is only mandatory while the two versions of the Feedback API are up. From tomorrow (October 28th) on, the previous version of this API wont be available anymore, so you wont need to send 'version' in the url, because there will be only one version up, do you see?

 

TOMORROW:

curl -X PUT -H "Content-Type: application/json" -d '{
  "fulfilled": true,
  "rating": "positive",
  "message": "It’s ok.",
}' "https://api.mercadolibre.com/feedback/{feedback_id}?version=3.0&access_token=$ACCESS_TOKEN"

You'll be sending the exact same request, without including version=3.0 in the url.

 

guibirow: It's the first time I heard of this. From tomorrow should work fine (please read the "Important" note), but anyway I'd like to see the request you're sending and the response you're getting so we can check it out, thank you.

Share this post


Link to post
Share on other sites
  • 0

Hi fsolari,

 

Thanks for the answer :)

Would like to mention few observations made here, felt they might be bugs, (I was logged in as a test user ):

 

Observation-1:

1. Bought a dummy listing, noted down the order ID (say it is order-1)

2. Posted a feedback to the order as a buyer and as a seller

3. Bought the same listing again (call it order-2)

4. Accessed /orders/<ID of order-2>/feedback - The feedbacks posted for previous order were sent as response

 

Is this an expected behavior ?

 

Observation-2:

Also seems as a seller I can see the details of feedback posted by buyer in the Order or feedback API response only after seller posts a feedback on the order - is this also an expected behavior ?

 

Thanks,

akng

Share this post


Link to post
Share on other sites
  • 0

Hi, those are both expected behaviors. 

Observation 1:

In this case, duplicated orders reflect the same feedback. By duplicated orders I mean orders between the same users for the same item.

Observation 2:

The reason for this behavior is that there's a rule that feedback remains hidden to the other part until both parts have sent feedback, or after 21 days. Whatever happens first will show the other part feedback to an user.

Share this post


Link to post
Share on other sites
  • 0

fsolari,

 

The URl is the standard url with version=3.0 as parameter.

Ex:

/oauth/token?grant_type=refresh_token&client_id={client_id}&client_secret={client_secret}&refresh_token={refresh_token}&version=3.0

Response:

{"message":"Wrong number of parameters","error":"invalid_request","status":400,"cause":[]}

Withour version parameter, the request will pass:

/oauth/token?grant_type=refresh_token&client_id={client_id}&client_secret={client_secret}&refresh_token={refresh_token}

Share this post


Link to post
Share on other sites
  • 0

In oauth don't need the parameter version.

Only in feedback!

 

 

fsolari,

 

The URl is the standard url with version=3.0 as parameter.

Ex:

/oauth/token?grant_type=refresh_token&client_id={client_id}&client_secret={client_secret}&refresh_token={refresh_token}&version=3.0

Response:

{"message":"Wrong number of parameters","error":"invalid_request","status":400,"cause":[]}

Withour version parameter, the request will pass:

/oauth/token?grant_type=refresh_token&client_id={client_id}&client_secret={client_secret}&refresh_token={refresh_token}

Share this post


Link to post
Share on other sites
  • 0

 

In oauth don't need the parameter version.

Only in feedback!

 

 

I know about parameters needed on OAuth, the problem is:

Every time they change the api version, we update our application to match the most recent api version, if they update only one resource, we need to change the code to set version only for that resource. this is annoying and result in Extra Code.

If we send the version on all requests it doesn't work, based on problem described before we have more work updating the code and debugging.

 

The API version, should be a subdomain instead of a parameter.

ex:

instead of: http://api.mercadolibre.com/resouce/?version=3.0
use: 
http://v3.api.mercadolibre.com/resouce/
or
http://api.mercadolibre.com/v3/resouce/

and no extra work will be needed, only the base Url must be updated.

Share this post


Link to post
Share on other sites
  • 0

fsolari,

I'd like to exploit the context and ask one thing about feedback that is very confusing.

What's the parameter used to consider the same feedback for two or more orders?

Today we have the following problem.

The user, sometimes, click twice or more on "Buy" button.
We already know when the purchase on the same day, will be send a single feedback for all.

Another case is when user do the same action, but the delay between purchases is longer, for example, after 7 days or 15 days.

How can I consider the same feedback if the system doesn't supply any parameter to know that?

I appreciate your help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this