Recursos Cross
Confira os principais recursos das nossas APIsDocumentação do
Você pode usar esta documentação para as seguintes unidades de negócio:
Gerenciamento de Envios
O recurso de Shipments contém todas as informações relacionadas ao envio que deve ser realizado para finalizar a transação.
É importante lembrar que o novo JSON de Orders não vai mais conter os dados de Shipping, como tem sido até agora. O recurso /shipments/shipment_id/ continuará tendo sua estrutura, mostrando as informações básicas para a realização do envio. Introduzimos algumas mudanças na estrutura do JSON, que você pode ver abaixo:
Consultar envios
Exemplo de chamada
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID
Resposta
{
"snapshot_packing": {
"snapshot_id": "string",
"pack_hash": "string"
},
"last_updated": "string",
"items_types": [
"new"
],
"substatus": "string",
"date_created": "string",
"origin": {
"node": "string", // campo correspondiente a la network_node_id de multi-origen
"shipping_address": {
"country": {
"id": "string",
"name": "string"
},
"address_line": "XXXXXXX",
"types": [
"billing",
"default_return_address",
"default_selling_address",
"flex_pickup",
"shipping"
],
"scoring": 0,
"agency": {
"carrier_id": null,
"phone": null,
"agency_id": null,
"description": null,
"type": null,
"open_hours": null
},
"city": {
"id": "string",
"name": "string"
},
"geolocation_type": "string",
"latitude": 0,
"address_id": 0,
"municipality": {
"id": null,
"name": null
},
"location_id": 0,
"street_name": "XXXXXXX",
"zip_code": "XXXXXXX",
"geolocation_source": "string",
"node": {
"node_id": "string" // campo correspondiente a la network_node_id de multi-origen
},
"intersection": null,
"street_number": "XXXXXXX",
"comment": "XXXXXXX",
"state": {
"id": "string",
"name": "string"
},
"neighborhood": {
"id": null,
"name": "string"
},
"geolocation_last_updated": "string",
"longitude": 0
},
"type": "string",
"sender_id": 0,
"snapshot": {
"id": "string",
"version": 0
}
},
"destination": {
"comments": null,
"receiver_id": 0,
"receiver_name": "string",
"shipping_address": {
"country": {
"id": "string",
"name": "string"
},
"address_line": "string",
"types": [
"string"
],
"scoring": 0,
"agency": {
"carrier_id": null,
"phone": null,
"agency_id": null,
"description": null,
"type": null,
"open_hours": null
},
"city": {
"id": "string",
"name": "string"
},
"geolocation_type": "string",
"latitude": 0,
"address_id": 0,
"municipality": {
"id": null,
"name": null
},
"location_id": 0,
"street_name": "string",
"zip_code": "string",
"geolocation_source": "string",
"delivery_preference": "string",
"node": null,
"intersection": null,
"street_number": "string",
"comment": null,
"state": {
"id": "string",
"name": "string"
},
"neighborhood": {
"id": null,
"name": "string"
},
"geolocation_last_updated": "string",
"longitude": 0
},
"type": "string",
"receiver_phone": "XXXXXXX",
"snapshot": {
"id": "string",
"version": 0
}
},
"source": {
"site_id": "string",
"market_place": "MELI",
"customer_id": null,
"application_id": null
},
"tags": [
"string"
],
"declared_value": 0,
"logistic": {
"mode": "me2",
"type": "drop_off",
"direction": "forward"
},
"sibling": {
"reason": null,
"sibling_id": null,
"description": null,
"source": null,
"date_created": null,
"last_updated": null
},
"priority_class": {
"id": "string"
},
"lead_time": {
"processing_time": null,
"cost": 0,
"estimated_schedule_limit": {
"date": null
},
"cost_type": "string",
"estimated_delivery_final": {
"date": "string",
"offset": 0
},
"buffering": {
"date": null
},
"pickup_promise": {
"from": null,
"to": null
},
"list_cost": 0,
"estimated_delivery_limit": {
"date": "string",
"offset": 0
},
"priority_class": {
"id": "string"
},
"delivery_promise": "string",
"shipping_method": {
"name": "string",
"deliver_to": "string",
"id": 511948,
"type": "string"
},
"delivery_type": "string",
"estimated_handling_limit": {
"date": "string"
},
"service_id": 22,
"estimated_delivery_time": {
"date": "string",
"pay_before": "string",
"schedule": null,
"unit": "string",
"offset": {
"date": "string",
"shipping": 0
},
"shipping": 0,
"time_frame": {
"from": null,
"to": null
},
"handling": 0,
"type": "string"
},
"option_id": 0,
"estimated_delivery_extended": {
"date": "string",
"offset": 0
},
"currency_id": "string"
},
"external_reference": null,
"tracking_number": "string",
"id": 0,
"tracking_method": "string",
"quotation": null,
"status": "string",
"dimensions": {
"height": 0,
"width": 0,
"length": 0,
"weight": 0
}
}
Itens associados a um envio
O recurso /shipments/shipment_id/items retorna os itens associados a um shipment. Caso o item contenha variações (Por exemplo, tamanho ou cor em vestuário), você também poderá ver qual corresponde à ordem dentro do envio. À medida que envios com mais de um item forem sendo habilitados, a lista passará a conter cada um deles.
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/items
[
{
"item_id": "string",
"description": "string",
"quantity": 0,
"variation_id": 0,
"dimensions": {
"height": 0,
"width": 0,
"length": 0,
"weight": 0
},
"order_id": 0,
"sender_id": 0
}
]
Costs
O recurso /shipments/shipment_id/costs retorna os custos do envio a serem pagos pelo usuário. Também poderá ser visualizada a economia atingida pelo envio de mais de um produto na mesma caixa (quando esta funcionalidade estiver habilitada), através do parâmetro "save", caso exista.
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/costs
{
"gross_amount": 24.55,
"receiver": {
"user_id": 74425755,
"cost": 0,
"compensation": 0,
"save": 0,
"discounts": [
{
"rate": 1,
"type": "loyal",
"promoted_amount": 4.07
}
]
},
"senders": [
{
"user_id": 81387353,
"cost": 8.19,
"compensation": 0,
"save": 0,
"discounts": [
{
"rate": 0.6,
"type": "mandatory",
"promoted_amount": 12.29
}
]
}
]
}
Parâmetros
gross_amount: É o custo total do shipment sem nenhum tipo de desconto.
discounts: representa os descontos aplicados para o comprador (receiver) e para o vendedor (sender), e a lista virá vazia caso não tenha descontos.
senders: é uma lista que representa os valores pagos pelo vendedor (sender), e um só envio poderá conter produtos de diferentes vendedores.
cost: representa o custo final do envio que corresponde ao comprador (receiver) e ao vendedor (sender).
Pagos de um envio
O recurso /shipments/shipment_id/payments retorna os payments associado ao frete. Lembre-se que agora o pagamento do envio será discriminado.
Chamada:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/payments
Exemplo:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/1111111111/payments
Resposta:
[
{
"payment_id": 1111111111,
"user_id": 291760105,
"amount": 17.7,
"status": "approved"
}
]
Prazos de entrega (Handling time)
O recurso /shipments/shipment_id/lead_time devolve tudo relacionado ao prazo de entrega de um envío e tipo de serviço, somando os prazos de despacho e entrega. Embora o recurso de base de shipment já traga informações úteis para fazer estas estimativas, aqui você poderá visualizá-las de forma mais detalhada, o que ajudará a proporcionar uma melhor experiência para o usuário.
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/lead_time
{
"option_id": 0,
"shipping_method": {
"id": 0,
"type": "standard",
"name": "string",
"deliver_to": "address"
},
"currency_id": "string",
"cost": 0,
"cost_type": "charged",
"service_id": 0,
"estimated_delivery_time": {
"type": "known",
"date": "string",
"shipping": 0,
"handling": 0,
"unit": "string",
"offset": {
"date": "string",
"shipping": 0
},
"time_frame": {
"from": 0,
"to": 0
},
"pay_before": "string"
},
"estimated_handling_limit": {
"date": "2016-12-30T12:32:35.000Z"
},
"estimated_delivery_extended": {
"date": "2016-12-30T12:32:35.000Z"
},
"estimated_delivery_limit": {
"date": "2016-12-30T12:32:35.000Z"
},
"estimated_delivery_final": {
"date": "2016-12-30T12:32:35.000Z"
},
"delay": [
"shipping_delayed",
]
}
O campo cost_type pode ser "free", "charged" ou "partially_free".
Campos da resposta
São as datas-limite para o envio ser encaminhado e enviado.
estimated_handling_limit: Data-limite para o vendedor encaminhar. Considere que apenas é levada em conta a data, pois a hora é informada somente para manter uma estrutura. Isto é, você tem todo o dia informado no campo para realizar o envio antes de este ser marcado como demorado para o dia seguinte.
estimated_delivery_extended: Segunda promessa de entrega, caso a primeira não tenha sido atendida.
estimated_delivery_limit: Data-limite para o comprador cancelar a compra e pedir a devolução de dinheiro, desde que o envio ainda não tenha chegado.
estimated_delivery_final: Data final para a chegada do envio e para determinação do status final, que pode ser delivered ou, caso haja alguma reclamação, not_delivered. Ver mais informações sobre tipos de promessa de entrega.
Conhecer envios com atraso
Os vendedores devem despachar seus pacotes em horários específicos para não afetar sua reputação. Utilize estes links em sua ferramenta para que seus vendedores tenham acesso a essa informação (Argentina, Brasil, México, Chile, Uruguai e Colombia).
Chamada:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/delays
Exemplo:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/30143583389/delays
Resposta:
{
"shipment_id": 30143583389,
"delays": [{
"type": "handling_delayed",
"date": "2020-09-23T09:07:20Z",
"source": "shipping-delays"
}]
}
Em breve teremos um recurso para consultar os horários e automatizar o processo.
History
O recurso /shipments/shipment_id/history retorna o histórico de status e substatus associados ao ciclo de vida do shipment.
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/history
Exemplo:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/1234567899/history
[
{
"status": "ready_to_ship",
"substatus": "printed",
"date": "2016-12-30T12:32:35.000Z"
},
{
"status": "handling",
"substatus": "waiting_for_label_generation",
"date": "2016-12-30T12:32:35.000Z"
},
]
Status e substatus Front vs API
Lembre-se que os status podem mudar de acordo com o tipo de logística.
Tracking para Cross Docking
Front | Descrição | API - "status_history" |
---|---|---|
"Em preparação" | "Estamos preparando o seu pacote" | status: handling |
"A caminho" | "O vendedor enviou o seu pacote" | status: ready_to_ship substatus: picked_up, authorized_by_carrier |
"Recebido no centro de distribuição de ....." | status: ready_to_ship substatus: in_hub |
|
"Entregue" | "Entregamos o pacote" | status: delivered |
Tracking para Fulfillment
Front | Descrição | API - "status_history" |
---|---|---|
"Em preparação" | "Estamos preparando o pacote" | status: handling |
"A caminho" | "Saiu do centro de distribuição" | status: shipped |
"Entregue" | "Entregamos o pacote" | status: delivered |
Informações de rastreio
O recurso /shipments/shipment_id/carrier devolver o nome e o URL para acessar as informações específicas do rastreio que está gerenciando o envio.
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/carrier
Exemplo:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/27691621451/carrier
{
"url":"http://tracking.totalexpress.com.br/poupup_track.php?reid=3&pedido=14&nfiscal=1",
"name":"Total Express"
}
Informações sobre status e substatus
Ver informações sobre status e substatus pelos que um envio pode passar:
Chamada:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipment_statuses
Resposta:
[
{
"id": "to_be_agreed",
"name": "To be agreed",
"substatuses": []
},
{
"id": "pending",
"name": "Pending",
"substatuses": [
{
"id": "cost_exceeded",
"name": "Cost exceeded"
},
{
"id": "under_review",
"name": "Under review (e.g. fraud)"
},
{
"id": "reviewed",
"name": "Reviewed"
},
{
"id": "fraudulent",
"name": "fraudulent"
},
{
"id": "waiting_for_payment",
"name": "Waiting for shipping payment to be accredited"
},
{
"id": "shipment_paid",
"name": "Shipping cost has been paid"
},
{
"id": "creating_route",
"name": "Route has been created"
},
{
"id": "manufacturing",
"name": "Manufacturing"
},
{
"id": "buffered",
"name": "Buffered"
},
{
"id": "creating_shipping_order",
"name": "Creating shipping order"
}
]
},
{
"id": "handling",
"name": "Handling",
"substatuses": [
{
"id": "regenerating",
"name": "Regenerating"
},
{
"id": "waiting_for_label_generation",
"name": "Waiting for label generation"
},
{
"id": "invoice_pending",
"name": "Invoice pending"
},
{
"id": "waiting_for_return_confirmation",
"name": "Waiting for return confirmation"
},
{
"id": "return_confirmed",
"name": "Return Confirmed"
},
{
"id": "manufacturing",
"name": "Manufacturing"
},
{
"id": "agency_unavailable",
"name": "Agency unavailable"
}
]
},
{
"id": "ready_to_ship",
"name": "Ready to ship",
"substatuses": [
{
"id": "ready_to_print",
"name": "Ready to print"
},
{
"id": "invoice_pending",
"name": "Invoice pending"
},
{
"id": "printed",
"name": "Printed"
},
{
"id": "in_pickup_list",
"name": "In pikcup list"
},
{
"id": "ready_for_pkl_creation",
"name": "Ready for pkl creation"
},
{
"id": "ready_for_pickup",
"name": "Ready for pickup"
},
{
"id": "ready_for_dropoff",
"name": "Ready for drop off"
},
{
"id": "picked_up",
"name": "Picked up"
},
{
"id": "stale",
"name": "Stale Ready To Ship"
},
{
"id": "dropped_off",
"name": "Dropped off in Melipoint"
},
{
"id": "delayed",
"name": "Delayed"
},
{
"id": "claimed_me",
"name": "Stale shipment claimed by buyer"
},
{
"id": "waiting_for_last_mile_authorization",
"name": "Waiting for last mile authorization"
},
{
"id": "rejected_in_hub",
"name": "Rejected in hub"
},
{
"id": "in_transit",
"name": "In transit"
},
{
"id": "in_warehouse",
"name": "In Warehouse"
},
{
"id": "ready_to_pack",
"name": "Ready to Pack"
},
{
"id": "in_hub",
"name": "In hub"
},
{
"id": "measures_ready",
"name": "Measures and weight ready"
},
{
"id": "waiting_for_carrier_authorization",
"name": "Waiting for carrier authorization"
},
{
"id": "authorized_by_carrier",
"name": "Authorized by carrier MELI"
},
{
"id": "in_packing_list",
"name": "In packing list"
},
{
"id": "in_plp",
"name": "In PLP"
},
{
"id": "on_hold",
"name": "On hold"
},
{
"id": "packed",
"name": "Packed"
},
{
"id": "on_route_to_pickup",
"name": "On route to pickup"
},
{
"id": "picking_up",
"name": "Picking up"
},
{
"id": "shipping_order_initialized",
"name": "Shipping order initialized"
},
{
"id": "looking_for_driver",
"name": "looking for driver"
}
]
},
{
"id": "shipped",
"name": "Shipped",
"substatuses": [
{
"id": "delayed",
"name": "Delayed"
},
{
"id": "waiting_for_withdrawal",
"name": "Waiting for withdrawal"
},
{
"id": "contact_with_carrier_required",
"name": "Contact with carrier required"
},
{
"id": "receiver_absent",
"name": "Receiver absent"
},
{
"id": "reclaimed",
"name": "Reclaimed"
},
{
"id": "not_localized",
"name": "Not localized"
},
{
"id": "forwarded_to_third",
"name": "Forwarded to third party"
},
{
"id": "soon_deliver",
"name": "Soon deliver"
},
{
"id": "refused_delivery",
"name": "Delivery refused"
},
{
"id": "bad_address",
"name": "Bad address"
},
{
"id": "changed_address",
"name": "Changed address"
},
{
"id": "negative_feedback",
"name": "Stale shipped with negative feedback by buyer"
},
{
"id": "need_review",
"name": "Need to review carrier status to understand what happened"
},
{
"id": "stale",
"name": "Stale shipped"
},
{
"id": "operator_intervention",
"name": "Need operator intervention"
},
{
"id": "claimed_me",
"name": "Stale shipped that was claimed by the receiver"
},
{
"id": "retained",
"name": "Retained when package is on going"
},
{
"id": "out_for_delivery",
"name": "Package is out for delivery"
},
{
"id": "delivery_failed",
"name": "Delivery failed"
},
{
"id": "waiting_for_confirmation",
"name": "waiting for confirmation"
},
{
"id": "at_the_door",
"name": "Shipment at buyers door"
},
{
"id": "buyer_edt_limit_stale",
"name": "Buyer edt limit stale"
},
{
"id": "delivery_blocked",
"name": "Delivery blocked"
},
{
"id": "awaiting_tax_documentation",
"name": "Awaiting tax documentation"
},
{
"id": "dangerous_area",
"name": "Dangerous area"
},
{
"id": "buyer_rescheduled",
"name": "Buyer rescheduled"
},
{
"id": "failover",
"name": "Failover"
},
{
"id": "picked_up",
"name": "Picked up"
},
{
"id": "dropped_off",
"name": "Dropped off"
},
{
"id": "at_customs",
"name": "At customs"
},
{
"id": "delayed_at_customs",
"name": "Delayed at customs"
},
{
"id": "left_customs",
"name": "Left customs"
},
{
"id": "missing_sender_payment",
"name": "Missing sender payment"
},
{
"id": "missing_sender_documentation",
"name": "Missing sender documentation"
},
{
"id": "missing_recipient_documentation",
"name": "Missing recipient documentation"
},
{
"id": "missing_recipient_payment",
"name": "Missing recipient payment"
},
{
"id": "import_taxes_paid",
"name": "Import taxes paid"
}
]
},
{
"id": "delivered",
"name": "Delivered",
"substatuses": [
{
"id": "damaged",
"name": "damaged"
},
{
"id": "fulfilled_feedback",
"name": "Fulfilled by buyer feedback"
},
{
"id": "no_action_taken",
"name": "No action taken by buyer"
},
{
"id": "double_refund",
"name": "Double Refund"
},
{
"id": "inferred",
"name": "Inferred Delivery"
}
]
},
{
"id": "not_delivered",
"name": "Not delivered",
"substatuses": [
{
"id": "returning_to_sender",
"name": "Returning to sender"
},
{
"id": "receiver_absent",
"name": "Receiver absent"
},
{
"id": "to_review",
"name": "Closed shipment"
},
{
"id": "destroyed",
"name": "Destroyed"
},
{
"id": "waiting_for_withdrawal",
"name": "Waiting for withdrawal"
},
{
"id": "negative_feedback",
"name": "Stale shipped forced to not delivered due to negative feedback by buyer"
},
{
"id": "not_localized",
"name": "Not localized"
},
{
"id": "double_refund",
"name": "Double Refund"
},
{
"id": "cancelled_measurement_exceeded",
"name": "Shipment cancelled for measurement exceeded"
},
{
"id": "returned_to_hub",
"name": "Returned to hub"
},
{
"id": "returned_to_agency",
"name": "Returned to agency"
},
{
"id": "picked_up_for_return",
"name": "Picked up for return"
},
{
"id": "claimed_me",
"name": "Not delivered that was claimed by the receiver"
},
{
"id": "returning_to_warehouse",
"name": "Returning to Warehouse"
},
{
"id": "returning_to_hub",
"name": "Returning to Hub"
},
{
"id": "soon_to_be_returned",
"name": "Soon to be returned"
},
{
"id": "return_failed",
"name": "Return failed"
},
{
"id": "in_storage",
"name": "In storage"
},
{
"id": "pending_recovery",
"name": "Pending recovery"
},
{
"id": "agency_unavailable",
"name": "Agency unavailable"
},
{
"id": "rejected_damaged",
"name": "Rejected damaged"
},
{
"id": "refused_delivery",
"name": "Refused delivery"
},
{
"id": "refunded_by_delay",
"name": "Refunded by delay"
},
{
"id": "delayed",
"name": "Delayed"
},
{
"id": "delayed_to_hub",
"name": "Delayed to hub"
},
{
"id": "shipment_stopped",
"name": "Shipment stopped"
},
{
"id": "awaiting_tax_documentation",
"name": "Awaiting tax documentation"
},
{
"id": "retained",
"name": "Retained"
},
{
"id": "stolen",
"name": "Stolen"
},
{
"id": "returned",
"name": "Returned"
},
{
"id": "confiscated",
"name": "confiscated"
},
{
"id": "damaged",
"name": "Package damaged in hub"
},
{
"id": "lost",
"name": "Package lost"
},
{
"id": "recovered",
"name": "Recovered"
},
{
"id": "returned_to_warehouse",
"name": "Returned to Warehouse"
},
{
"id": "not_recovered",
"name": "Not recovered"
},
{
"id": "detained_at_customs",
"name": "Detained at customs"
},
{
"id": "detained_at_origin",
"name": "Detained at origin"
},
{
"id": "unclaimed",
"name": "Unclaimed by seller"
},
{
"id": "import_tax_rejected",
"name": "Import tax rejected"
},
{
"id": "import_tax_expired",
"name": "Import tax expired"
},
{
"id": "rider_not_found",
"name": "Rider not found"
}
]
},
{
"id": "not_verified",
"name": "Not verified",
"substatuses": []
},
{
"id": "cancelled",
"name": "Cancelled",
"substatuses": [
{
"id": "recovered",
"name": "Recovered"
},
{
"id": "label_expired",
"name": "Label Expired"
},
{
"id": "cancelled_manually",
"name": "Cancelled Manually"
},
{
"id": "fraudulent",
"name": "Cancelled Fraudulent"
},
{
"id": "return_expired",
"name": "Return expired"
},
{
"id": "return_session_expired",
"name": "Return session expired"
},
{
"id": "unfulfillable",
"name": "Unfulfillable"
},
{
"id": "closed_by_user",
"name": "User changes the type of shipping and cancels the previous"
},
{
"id": "pack_splitted",
"name": "The pack was split by the cart splitter so the shipment gets cancelled"
},
{
"id": "shipped_outside_me",
"name": "Shipped outside me"
},
{
"id": "shipped_outside_me_trusted",
"name": "Shipped outside me by trusted seller"
},
{
"id": "inferred_shipped",
"name": "Inferred shipped"
},
{
"id": "service_unavailable",
"name": "Service unavailable"
},
{
"id": "dismissed",
"name": "Dismissed"
},
{
"id": "time_expired",
"name": "Time expired"
},
{
"id": "pack_partially_cancelled",
"name": "Pack partially cancelled"
},
{
"id": "rejected_manually",
"name": "Rejected manually"
},
{
"id": "closed_store",
"name": "Closed store"
},
{
"id": "out_of_range",
"name": "Out of range"
}
]
},
{
"id": "closed",
"name": "Closed",
"substatuses": []
},
{
"id": "error",
"name": "Error",
"substatuses": []
},
{
"id": "active",
"name": "Active",
"substatuses": []
},
{
"id": "not_specified",
"name": "Not specified",
"substatuses": []
},
{
"id": "stale_ready_to_ship",
"name": "Stale ready to ship",
"substatuses": []
},
{
"id": "stale_shipped",
"name": "Stale shipped",
"substatuses": []
}
]
Criar pacotes adicionais de envio
Caso você tenha um problema no momento de agrupar diferentes produtos em um mesmo pacote (seja porque estão em depósitos diferentes, ou são frágeis, ou não entram em uma mesma caixa etc) você pode utilizar o recurso que te permite gerar pacotes adicionais para poder despachar todos os produtos.
Considerações
- Todos os subpacks carregam um package_id único dentro do body.
- Nenhum dos subpacks carrega um package_id.
O anterior implica que pode não ser usado, mas se tem um package_id em algum subpack, todos eles devem ter um package_id. Além disso devem ser diferentes para identificá-los.
- O envio deve ter uma quantidade de pedido superior a 2 ou ter mais de uma order.
- O order_id representa o pedido que contém o produto que deve ser separado do pacote original.
- Um novo envio será criado com o pedido correspondente à order_id e disparará as notificações correspondentes.
- O mesmo envio pode ser dividido apenas em duas caixas por vez, e não pode ser dividido múltiplas vezes.
Chamada:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'x-format-new: true' https://api.mercadolibre.com/shipments/$SHIPMENT_ID/split -d
{
"reason": "DIMENSIONS_EXCEEDED",
"packs": [{
"package_id": 12345, --- OPTIONAL FIELD ---
"orders": [{
"id": 123123123123,
"quantity": 2
}]
},
{
"package_id": 345677, --- OPTIONAL FIELD ---
"orders": [{
"id": 123123123123,
"quantity": 1
},
{
"id": 2424242424242,
"quantity": 1
}
]
}
]
}
Valores possíveis no campo "reason"
FRAGILE: produtos frágeis.
ANOTHER_WAREHOUSE: outro centro de distribuição.
IRREGULAR_SHAPE: forma irregular.
OTHER_MOTIVE: outro motivo.
DIMENSIONS_EXCEEDED: dimensões excedidas.
Conheça mais sobre Modos de Envios, Gerenciamento de Orders de Carrinho.
Seguinte: Pagamentos