Skip to content

Cancel Guide

This guide allows you to cancel a shipping label using the DrEnvío API.

Environments

DrEnvio API supports two environments: Production and Sandbox.

Production Environment The production environment is where actual shipments are processed. To use the production API, send your requests to the following URL:

Terminal window
https://prod.api-drenvio.com/v2/shipments/cancel

Sandbox Environment The sandbox environment is used for testing purposes. It provides simulated data to help you develop and test your integration before moving to production. To use the sandbox API, send your requests to the following URL:

Terminal window
https://sandbox.api-drenvio.com/v2/shipments/cancel

API request

To cancel the shipping label, send a POST request with a JSON body like this:

{
"trackingNumber": "UAT301007266401"
}

Fields description

FieldDescriptionTypeRequired
trackingNumberThe tracking number of the shipment you want to cancelstringtrue

API response

{
"canceled": true,
"messsage": "Fedex Cancel Done",
"shipmentCanceled": {
"carrier": "Fedex",
"id": "64b07cc66da4318b09215a37",
"service": "ground",
"trackingNumber": "UAT301007281516"
}
}