Cancel shipment by ID

This endpoint allows to cancel a specific shipment by its ID. Once canceled, the shipment cannot be reactivated. This is useful when a shipment needs to be canceled before dispatch, and can only be used to cancel detached shipments. To cancel a payment with shipment, created from a preference, the "Create cancellation" endpoint must be used. In case of success, the request will return a response with status 204 and without content.

DELETE

https://api.mercadopago.com/shipping/v1/shipments/{id}
Request parameters
Header
Authorization
string

REQUIRED

Access Token obtained through the developer panel. Must be sent in all requests.
Path
id
string

REQUIRED

Unique identifier of the shipment to be canceled.
Response parameters
Esta solicitação não tem resposta
Errors

400Bad request. The parameters sent are not valid.

bad_request

Invalid data was sent in the request body. Try sending the request again, validating all fields.

401Unauthorized. Invalid or missing credentials.

unauthorized

The value sent as Access Token is incorrect. Please check and try again with the correct value.

403Forbidden. You don't have permissions to access this resource.

forbidden

No permission to access the resource.

404Not found. The requested resource does not exist.

not_found

The requested resource was not found or the value sent for its identification does not exist. Validate the information sent in the parameters and try the request again.

417Expectation failed.

expectation_failed

Could not meet the expectation specified in the "Expect" header. Validate the information sent and try the request again.

Request
curl -X DELETE \
    'https://api.mercadopago.com/shipping/v1/shipments/{id}'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer APP_USR-4*********994754-12*********c73b4e1ac*********cef36b27c*********840' \
    
Response
// This request has not been responded to.