• 0
Sign in to follow this  
ponco

No sirve el resource POST orders/{order_id}/shipments

Question

Hola, he tratado varias horas de hacer funcionar lo siguiente http://developers.mercadolibre.com/custom-shipping/#delivery scenario #3

 

Quote

Scenario 3

When the order has no shipping:


curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d 
JSON
{
  "status": "shipped",
  "receiver_id": 12345678,
  "shipping_option": {
      "currency_id": "MXN",
      "cost": 0,
      "speed": 120
  }
}
https://api.mercadolibre.com/orders/{order_id}/shipments?access_token=$ACCESS_TOKEN

Explanatory Note:

  • The speed field should be in the “shipping_options” section. Also, when creating the shipping, a cost should be specified.

 

Mi request luce asi:

{"status":"shipped","receiver_id":(userid),"shipping_option":{"currency_id":"MXN","cost":0.0,"speed":120}}

Siempre devuelve lo siguiente:

Quote

{
    "message": "Unauthorized receiver_id for order_id: (order_id)",
    "error": "invalid_user_id_for_order",
    "status": 401,
    "cause": null
}

El valor que envio de receiver_id es correcto y tambien el order_id con la que llamo al recurso. Ya intente poniendo los siguientes valores (entre otros, ya intente con todo)

Quote

"created_by": "sender"

"mode": "custom"

"sender_id": (sender_id)

Pero el resultado siempre es el mismo.

Tambien estoy seguro que el order_id no tiene un shipment, es una orden que aparece con status:

Quote

  "shipping": {
        "status": "to_be_agreed"
    },

 

Por favor solucionen eso, o si me estoy equivocando en el request diganme por favor.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • -1
5 hours ago, rodrigojob said:

o receiver id é o número do comprador. você está sempre mandando para o mesmo número. Verifique qual é o ID do  comprador na venda

I know this, I'm sending the buyer_id in the receiver_id field, the resource is badly coded, check it and fix it.

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