# 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](/developers/en/reference/online-payments/checkout-pro-preferences/create-cancellation/put) endpoint must be used. After 15 days, all generated shipments that have not been dispatched will be automatically canceled and the cost will be returned to the seller. In case of success, the request will return a response with status 204 and without content. **DELETE** `/shipping/v1/shipments/{id}` ## Request parameters ### Path - `id` (string, required) Unique identifier of the shipment to be canceled. ## Response parameters This endpoint has no response body. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | bad_request | Invalid data was sent in the request `body`. Try sending the request again, validating all fields. | | 401 | unauthorized | The value sent as Access Token is incorrect. Please check and try again with the correct value. | | 403 | forbidden | No permission to access the resource. | | 404 | 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. | | 417 | expectation_failed | Could not meet the expectation specified in the `Expect` header. Validate the information sent and try the request again. | ## Request example ### cURL ```bash curl -X DELETE \ 'https://api.mercadopago.com/shipping/v1/shipments/{id}' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' ```