• 0
Sign in to follow this  
Renan Nhola

Filtrar order.payments.status

Question

Para filtrar o status de um pedido é simples basta informar:

https://api.mercadolibre.com/orders/search?access_token=XXXX&seller=XXXX&order.status=confirmed

Como Filtro o Status do Payments = "Rejected" ou "Approved" ou "Confirmed"

Exemplo de XML que tem o "payments.status = refunded" e como filtro este campo?

        {
            "id": 50505050,
            "comments": null,
            "status": "confirmed",
            "payments": [
                {
                    
                    "status": "refunded",
                    "status_code": "00",
                    "status_detail": "bpp_refunded",
                }
            ]
        }


Algumas tentativas sem sucesso que tentei.

&order.payments.status=refunded

&payments.status=refunded

&payments=refunded

:)

 

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Wesley Obrigado por sua interação !

E Parabéns pelo seu curso eu assisti e achei o máximo

Os filtros disponíveis são os que constam na tag "available_filters" ?

Share this post


Link to post
Share on other sites
  • 0

Os filtros disponíveis nesse recurso são

"available_filters": [
    {
      "id": "order.status",
      "name": "Order Status",
      "type": "text",
      "values": [
        {
          "id": "confirmed",
          "name": "Order Confirmed",
          "results": 0
        },
        {
          "id": "payment_in_process",
          "name": "Payment in Process",
          "results": 0
        },
        {
          "id": "paid",
          "name": "Order Paid",
          "results": 0
        },
        {
          "id": "payment_required",
          "name": "Payment Required",
          "results": 0
        },
        {
          "id": "cancelled",
          "name": "Order Cancelled",
          "results": 0
        },
        {
          "id": "invalid",
          "name": "Invalid",
          "results": 0
        }
      ]
    },
    {
      "id": "shipping.status",
      "name": "Shipping Status",
      "type": "text",
      "values": [
        {
          "id": "to_be_agreed",
          "name": "To be agreed",
          "results": 0
        },
        {
          "id": "pending",
          "name": "Pending",
          "results": 0
        },
        {
          "id": "handling",
          "name": "Handling",
          "results": 0
        },
        {
          "id": "ready_to_ship",
          "name": "Ready to ship",
          "results": 0
        },
        {
          "id": "shipped",
          "name": "Shipped",
          "results": 0
        },
        {
          "id": "delivered",
          "name": "Delivered",
          "results": 0
        },
        {
          "id": "not_delivered",
          "name": "Not delivered",
          "results": 0
        },
        {
          "id": "not_verified",
          "name": "Not verified",
          "results": 0
        },
        {
          "id": "cancelled",
          "name": "Cancelled",
          "results": 0
        },
        {
          "id": "closed",
          "name": "Closed",
          "results": 0
        },
        {
          "id": "error",
          "name": "Error",
          "results": 0
        },
        {
          "id": "active",
          "name": "Active",
          "results": 0
        },
        {
          "id": "not_specified",
          "name": "Not specified",
          "results": 0
        },
        {
          "id": "stale_ready_to_ship",
          "name": "Stale ready to ship",
          "results": 0
        },
        {
          "id": "stale_shipped",
          "name": "Stale shipped",
          "results": 0
        }
      ]
    },
    {
      "id": "feedback.sale.rating",
      "name": "Feedback rating",
      "type": "text",
      "values": [
        {
          "id": "negative",
          "name": "Negative",
          "results": 0
        },
        {
          "id": "neutral",
          "name": "Neutral",
          "results": 0
        },
        {
          "id": "positive",
          "name": "Positive",
          "results": 0
        }
      ]
    },
    {
      "id": "feedback.purchase.rating",
      "name": "Feedback rating",
      "type": "text",
      "values": [
        {
          "id": "negative",
          "name": "Negative",
          "results": 0
        },
        {
          "id": "neutral",
          "name": "Neutral",
          "results": 0
        },
        {
          "id": "positive",
          "name": "Positive",
          "results": 0
        }
      ]
    },
    {
      "id": "feedback.sale.fulfilled",
      "name": "Feedback sale fulfilled",
      "type": "boolean",
      "values": [
        {
          "id": "F",
          "name": "Transaction was aborted",
          "results": 0
        },
        {
          "id": "T",
          "name": "Transaction actually happened",
          "results": 0
        }
      ]
    },
    {
      "id": "feedback.purchase.fulfilled",
      "name": "Feedback purchase fulfilled",
      "type": "boolean",
      "values": [
        {
          "id": "F",
          "name": "Transaction was aborted",
          "results": 0
        },
        {
          "id": "T",
          "name": "Transaction actually happened",
          "results": 0
        }
      ]
    },
    {
      "id": "shipping.service_id",
      "name": "Shipping Service",
      "type": "long",
      "values": [
        {
          "id": "22",
          "name": "Sedex",
          "results": 0
        },
        {
          "id": "292",
          "name": "Fulfillment Express",
          "results": 0
        },
        {
          "id": "102",
          "name": "Coleta Express",
          "results": 0
        },
        {
          "id": "761",
          "name": "SuperExpress",
          "results": 0
        },
        {
          "id": "110",
          "name": "Total Express",
          "results": 0
        },
        {
          "id": "101",
          "name": "Coleta Normal",
          "results": 0
        },
        {
          "id": "104",
          "name": "DGT Normal",
          "results": 0
        },
        {
          "id": "21",
          "name": "PAC",
          "results": 0
        },
        {
          "id": "105",
          "name": "Total Normal",
          "results": 0
        },
        {
          "id": "107",
          "name": "Directlog Normal",
          "results": 0
        },
        {
          "id": "293",
          "name": "Fulfillment Express",
          "results": 0
        },
        {
          "id": "751",
          "name": "Cross Border Trade",
          "results": 0
        },
        {
          "id": "161",
          "name": "CBT",
          "results": 0
        },
        {
          "id": "23",
          "name": "eSedex",
          "results": 0
        },
        {
          "id": "109",
          "name": "Transfolha Express",
          "results": 0
        },
        {
          "id": "106",
          "name": "Transfolha Normal",
          "results": 0
        },
        {
          "id": "301",
          "name": "DGT Expresso",
          "results": 0
        },
        {
          "id": "103",
          "name": "Coleta Express",
          "results": 0
        },
        {
          "id": "691",
          "name": "Total Medio Rodo",
          "results": 0
        },
        {
          "id": "261",
          "name": "Cougar Normal",
          "results": 0
        },
        {
          "id": "291",
          "name": "Fulfillment Normal",
          "results": 0
        },
        {
          "id": "108",
          "name": "Directlog Express",
          "results": 0
        },
        {
          "id": "262",
          "name": "Cougar Expresso",
          "results": 0
        },
        {
          "id": "264",
          "name": "Jadlog Expresso",
          "results": 0
        },
        {
          "id": "263",
          "name": "Jadlog Normal",
          "results": 0
        },
        {
          "id": "282",
          "name": "CBT",
          "results": 0
        },
        {
          "id": "11",
          "name": "Otros",
          "results": 0
        },
        {
          "id": "741",
          "name": "Cross Border Trade",
          "results": 0
        }
      ]
    },
    {
      "id": "shipping.substatus",
      "name": "Shipping Substatus",
      "type": "text",
      "values": [
        {
          "id": "cost_exceeded",
          "name": "Cost exceeded",
          "results": 0
        },
        {
          "id": "under_review",
          "name": "Under review (e.g. fraud)",
          "results": 0
        },
        {
          "id": "reviewed",
          "name": "Reviewed",
          "results": 0
        },
        {
          "id": "fraudulent",
          "name": "Cancelled Fraudulent",
          "results": 0
        },
        {
          "id": "waiting_for_payment",
          "name": "Waiting for shipping payment to be accredited",
          "results": 0
        },
        {
          "id": "shipment_paid",
          "name": "Shipping cost has been paid",
          "results": 0
        },
        {
          "id": "regenerating",
          "name": "Regenerating",
          "results": 0
        },
        {
          "id": "waiting_for_label_generation",
          "name": "Waiting for label generation",
          "results": 0
        },
        {
          "id": "invoice_pending",
          "name": "Invoice pending",
          "results": 0
        },
        {
          "id": "waiting_for_return_confirmation",
          "name": "Waiting for return confirmation",
          "results": 0
        },
        {
          "id": "return_confirmed",
          "name": "Return Confirmed",
          "results": 0
        },
        {
          "id": "ready_to_print",
          "name": "Ready to print",
          "results": 0
        },
        {
          "id": "printed",
          "name": "Printed",
          "results": 0
        },
        {
          "id": "in_pickup_list",
          "name": "In pikcup list",
          "results": 0
        },
        {
          "id": "ready_for_pkl_creation",
          "name": "Ready for pkl creation",
          "results": 0
        },
        {
          "id": "ready_for_pickup",
          "name": "Ready for pickup",
          "results": 0
        },
        {
          "id": "ready_for_dropoff",
          "name": "Ready for drop off",
          "results": 0
        },
        {
          "id": "picked_up",
          "name": "Picked up",
          "results": 0
        },
        {
          "id": "stale",
          "name": "Stale shipped",
          "results": 0
        },
        {
          "id": "dropped_off",
          "name": "Dropped off in Melipoint",
          "results": 0
        },
        {
          "id": "in_hub",
          "name": "In hub",
          "results": 0
        },
        {
          "id": "measures_ready",
          "name": "Measures and weight ready",
          "results": 0
        },
        {
          "id": "waiting_for_carrier_authorization",
          "name": "Waiting for carrier authorization",
          "results": 0
        },
        {
          "id": "authorized_by_carrier",
          "name": "Authorized by carrier",
          "results": 0
        },
        {
          "id": "in_packing_list",
          "name": "In packing list",
          "results": 0
        },
        {
          "id": "in_plp",
          "name": "In PLP",
          "results": 0
        },
        {
          "id": "in_warehouse",
          "name": "In Warehouse",
          "results": 0
        },
        {
          "id": "packed",
          "name": "Packed",
          "results": 0
        },
        {
          "id": "delayed",
          "name": "Delayed",
          "results": 0
        },
        {
          "id": "waiting_for_withdrawal",
          "name": "Waiting for withdrawal",
          "results": 0
        },
        {
          "id": "contact_with_carrier_required",
          "name": "Contact with carrier required",
          "results": 0
        },
        {
          "id": "receiver_absent",
          "name": "Receiver absent",
          "results": 0
        },
        {
          "id": "reclaimed",
          "name": "Reclaimed",
          "results": 0
        },
        {
          "id": "not_localized",
          "name": "Not localized",
          "results": 0
        },
        {
          "id": "forwarded_to_third",
          "name": "Forwarded to third party",
          "results": 0
        },
        {
          "id": "soon_deliver",
          "name": "Soon deliver",
          "results": 0
        },
        {
          "id": "refused_delivery",
          "name": "Delivery refused",
          "results": 0
        },
        {
          "id": "bad_address",
          "name": "Bad address",
          "results": 0
        },
        {
          "id": "negative_feedback",
          "name": "Stale shipped forced to not delivered due to negative feedback by buyer",
          "results": 0
        },
        {
          "id": "need_review",
          "name": "Need to review carrier status to understand what happened",
          "results": 0
        },
        {
          "id": "operator_intervention",
          "name": "Need operator intervention",
          "results": 0
        },
        {
          "id": "claimed_me",
          "name": "Not delivered that was claimed by the receiver",
          "results": 0
        },
        {
          "id": "retained",
          "name": "Retained",
          "results": 0
        },
        {
          "id": "damaged",
          "name": "Package damaged in hub",
          "results": 0
        },
        {
          "id": "fulfilled_feedback",
          "name": "Fulfilled by buyer feedback",
          "results": 0
        },
        {
          "id": "no_action_taken",
          "name": "No action taken by buyer",
          "results": 0
        },
        {
          "id": "double_refund",
          "name": "Double Refund",
          "results": 0
        },
        {
          "id": "returning_to_sender",
          "name": "Returning to sender",
          "results": 0
        },
        {
          "id": "stolen",
          "name": "Stolen",
          "results": 0
        },
        {
          "id": "returned",
          "name": "Returned",
          "results": 0
        },
        {
          "id": "confiscated",
          "name": "confiscated",
          "results": 0
        },
        {
          "id": "to_review",
          "name": "Closed shipment",
          "results": 0
        },
        {
          "id": "destroyed",
          "name": "Destroyed",
          "results": 0
        },
        {
          "id": "lost",
          "name": "Package lost",
          "results": 0
        },
        {
          "id": "cancelled",
          "name": "Shipment cancelled",
          "results": 0
        },
        {
          "id": "returned_to_hub",
          "name": "Returned to hub",
          "results": 0
        },
        {
          "id": "returned_to_agency",
          "name": "Returned to agency",
          "results": 0
        },
        {
          "id": "picked_up_for_return",
          "name": "Picked up for return",
          "results": 0
        },
        {
          "id": "recovered",
          "name": "Recovered",
          "results": 0
        },
        {
          "id": "label_expired",
          "name": "Label Expired",
          "results": 0
        },
        {
          "id": "cancelled_manually",
          "name": "Cancelled Manually",
          "results": 0
        },
        {
          "id": "return_expired",
          "name": "Return expired",
          "results": 0
        },
        {
          "id": "return_session_expired",
          "name": "Return session expired",
          "results": 0
        }
      ]
    },
    {
      "id": "feedback.status",
      "name": "Feedback Status",
      "type": "text",
      "values": [
        {
          "id": "pending",
          "name": "Waiting for your feedback",
          "results": 0
        },
        {
          "id": "waiting_buyer",
          "name": "Waiting for Buyer's feedback",
          "results": 0
        }
      ]
    },
    {
      "id": "tags",
      "name": "Tags",
      "type": "text",
      "values": [
        {
          "id": "delivered",
          "name": "Delivered",
          "results": 0
        },
        {
          "id": "not_delivered",
          "name": "Not Delivered",
          "results": 0
        },
        {
          "id": "paid",
          "name": "Order Paid",
          "results": 0
        },
        {
          "id": "not_paid",
          "name": "Order Not Paid",
          "results": 0
        },
        {
          "id": "claim_closed",
          "name": "Claim Closed",
          "results": 0
        },
        {
          "id": "claim_opened",
          "name": "Claim Opened",
          "results": 0
        },
        {
          "id": "not_processed",
          "name": "Not processed order",
          "results": 0
        },
        {
          "id": "processed",
          "name": "Processed order",
          "results": 0
        },
        {
          "id": "returned",
          "name": "Returned order",
          "results": 0
        },
        {
          "id": "pack_order",
          "name": "Cart Order",
          "results": 0
        }
      ]
    },
    {
      "id": "mediations.status",
      "name": "Mediation Status",
      "type": "text",
      "values": [
        {
          "id": "claim_opened",
          "name": "Claim opened",
          "results": 0
        },
        {
          "id": "claim_closed",
          "name": "Claim closed",
          "results": 0
        },
        {
          "id": "dispute_opened",
          "name": "Dispute opened",
          "results": 0
        },
        {
          "id": "dispute_closed",
          "name": "Dispute closed",
          "results": 0
        },
        {
          "id": "seller_dispute_opened",
          "name": "Seller dispute opened",
          "results": 0
        },
        {
          "id": "seller_dispute_closed",
          "name": "Seller dispute closed",
          "results": 0
        }
      ]
    },
    {
      "id": "order_request.return",
      "name": "Order-Request Return status",
      "type": "text",
      "values": [
        {
          "id": "required",
          "name": "Return required",
          "results": 0
        },
        {
          "id": "cancelled",
          "name": "Return cancelled",
          "results": 0
        },
        {
          "id": "expired",
          "name": "Return expired",
          "results": 0
        },
        {
          "id": "accepted",
          "name": "Return accepted",
          "results": 0
        },
        {
          "id": "partially_paid",
          "name": "Return partially paid",
          "results": 0
        },
        {
          "id": "paid",
          "name": "Return paid",
          "results": 0
        },
        {
          "id": "failed",
          "name": "Return failed",
          "results": 0
        },
        {
          "id": "closed",
          "name": "Return closed",
          "results": 0
        }
      ]
    },
    {
      "id": "order_request.change",
      "name": "Order-Request Change status",
      "type": "text",
      "values": [
        {
          "id": "required",
          "name": "Change required",
          "results": 0
        },
        {
          "id": "cancelled",
          "name": "Change cancelled",
          "results": 0
        },
        {
          "id": "expired",
          "name": "Change expired",
          "results": 0
        },
        {
          "id": "accepted",
          "name": "Change accepted",
          "results": 0
        },
        {
          "id": "partially_paid",
          "name": "Change partially paid",
          "results": 0
        },
        {
          "id": "paid",
          "name": "Change paid",
          "results": 0
        },
        {
          "id": "failed",
          "name": "Change failed",
          "results": 0
        },
        {
          "id": "closed",
          "name": "Change closed",
          "results": 0
        }
      ]
    }
  ]

Enjoy! :27_sunglasses:

Share this post


Link to post
Share on other sites
  • 0

Filtros disponiveis

Portugues

Solicitação de pedido Alterar status
Estado de devolução do pedido
Estado de mediação
Tag
Reembolso duplo
Substatus de envio
Serviço de entrega
A venda de Feedback foi cumprida
Classificação de votos COMPRADOR e VENDA
Status de envio
Status do pedido

English

Order-Request Change status
Order-Request Return status
Mediation Status
tags
Double Refund
Shipping Substatus
Shipping Service
Feedback sale fulfilled
Feedback rating BUYER and SALE
Shipping Status
Order Status

 

Edited by Renan Nhola

Share this post


Link to post
Share on other sites
  • 0

[RESOLVIDO]

Já que API do mercado livre não tem consulta por Payments a solução foi

1º Consulto nesta api do mercado pago

https://api.mercadopago.com/v1/payments/search?access_token=XXXX&status=refunded

-------------------------------------------------------------------------------------

2º Pego a lista de ID de pagamento retornado pela api do mercado pago

"order": {
                "id": "123456789",
                "type": "mercadolibre"
            }

3º Apos pegar uma lista de 10 por exemplo, faço 10 requisições no ML atraves deste resource, 1 por 1 já que o ML nao aceita consultar mais de 1 id ao mesmo tempo

https://api.mercadolibre.com/orders/search/recent?seller=11111&access_token=XXXX&q=123456789

--------------------------------------------------------------------------------------

É complexo e demorado, mais funciona, por enquanto irei utilizar esta rotina até achar algo melhor

Obrigado pela ajuda no NINJA WESLEY

 

Edited by Renan Nhola

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