Busca inteligente powered by OpenAI
Cancelar pedido
PUT
Produtos relacionados:
Parâmetros de requisição
PATH
shipment_id
Shipment ID do pedido.string
OBRIGATÓRIO
BODY
status
Este campo indica o status do pedido, que deve ter o valor "cancelled" para este endpoint.string
cancellation_reason
Motivo do cancelamento que foi recuperado do endpoint de motivos de cancelamento.object
Parâmetros de resposta
status
Status of the order after its cancellation. The Status value that will be returned is "cancelled".string
Erros
400Erro
400
Conflict-error - This order cannot be cancelled due to its current status.
401Erro
401
Unauthorized - Access Token is invalid
403Erro
403
Forbidden - User cannot access this resource
424Erro
424
Not Found - Failed to get some information of the order
500Erro
500
Internal server error
Requisição
curl -X PUT \
'https://api.mercadopago.com/proximity-integration/shipments/{shipment_id}/cancel'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TEST-4599*********755-11221*********d497ae962*********ecf8d85-1*********' \
-d '{
"status": "cancelled",
"cancellation_reason": {
"id": "CS7452",
"value": "out_of_stock",
"message": "Me falta alguno de los productos."
}
}'
Resposta de exemplo
{
"status": "cancelled"
}