API Reference
5.- Cancelar envío
Este endpoint permite cancelar un envío dentro de México, siempre y cuando el envío pertenezca al mismo usuario que realiza la solicitud y no haya sido utilizado, es decir, que el paquete no haya sido recolectado ni entregado en sucursal, y que el envío no se encuentre previamente cancelado.
Al cancelar el envío de forma exitosa, el costo del envío es bonificado automáticamente al saldo de la cuenta del usuario. La respuesta devuelve la información actualizada del envío con su nuevo estado y un identificador único de la transacción para fines de trazabilidad.
POST
https://apirest.sheeping.io
/
v1
/
cancel-shipment
5.- Cancelar envío
curl --request POST \
--url https://apirest.sheeping.io/v1/cancel-shipment \
--header 'Content-Type: application/json' \
--data '
{
"shipment_tracking_number": "883163967169"
}
'import requests
url = "https://apirest.sheeping.io/v1/cancel-shipment"
payload = { "shipment_tracking_number": "883163967169" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({shipment_tracking_number: '883163967169'})
};
fetch('https://apirest.sheeping.io/v1/cancel-shipment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apirest.sheeping.io/v1/cancel-shipment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shipment_tracking_number' => '883163967169'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apirest.sheeping.io/v1/cancel-shipment"
payload := strings.NewReader("{\n \"shipment_tracking_number\": \"883163967169\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apirest.sheeping.io/v1/cancel-shipment")
.header("Content-Type", "application/json")
.body("{\n \"shipment_tracking_number\": \"883163967169\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apirest.sheeping.io/v1/cancel-shipment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"shipment_tracking_number\": \"883163967169\"\n}"
response = http.request(request)
puts response.read_body{
"shipment": {
"internal_id": "1829cc48-9ea9-497f-92c1-6e6aae2885ee",
"creation_date": "2026-01-08T19:27:19.945288",
"modification_date": "2026-01-08T19:27:19.945288",
"label_number": "883163967169",
"tracking_number": "883163967169",
"status": "CANCELLED"
},
"transaction_id": "1829cc48-9ea9-497f-92c1-6e6aae2885ee"
}{
"error": {
"code": "USER_INACTIVE_ERROR",
"message": "Lo sentimos no puedes realizar esta acción debido a que tu cuenta no esta activa, favor de contactar a tu asesor.",
"details": null
},
"transaction_id": "2aefad11-a0f6-4c7d-9601-fdc03309faaf"
}{
"error": {
"code": "SHIPMENT_NO_FOUND",
"message": "Lo sentimos el envio 883163967169 no se encuentra disponible o no existe, favor de contactar a tu asesor.",
"details": null
},
"transaction_id": "a8e0478e-8df8-4746-9e75-aec1e2a60ca6"
}{
"detail": "Método \"GET\" no permitido.",
"status_code": 405
}{
"error": {
"code": "REQUEST_ERROR_406",
"message": "Datos de la solicitud incompletos.",
"details": {
"shipment_tracking_number": [
"Asegúrese de que este campo tenga al menos 3 caracteres."
]
}
},
"transaction_id": "40fda139-b2a6-4bdd-a2e6-55b4f0acecc0"
}{
"error": {
"code": "SHIPMENT_CANNOT_BE_CANCELLED",
"message": "El envío 883163967169 no puede cancelarse porque ya fue cancelado o se encuentra en proceso de entrega.",
"details": null
},
"transaction_id": "2aefad11-a0f6-4c7d-9601-fdc03309faaf"
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Lo sentimos hubo un error inesperado, favor de intentar mas tarde.",
"details": null
},
"transaction_id": "9f091a8a-a214-4c23-8b89-560670c64714"
}{
"error": {
"code": "PROVIDER_TIMEOUT",
"message": "El proveedor está tardando demasiado en responder, favor de intentar mas tarde.",
"details": null
},
"transaction_id": "9f091a8a-a214-4c23-8b89-560670c64714"
}⌘I
5.- Cancelar envío
curl --request POST \
--url https://apirest.sheeping.io/v1/cancel-shipment \
--header 'Content-Type: application/json' \
--data '
{
"shipment_tracking_number": "883163967169"
}
'import requests
url = "https://apirest.sheeping.io/v1/cancel-shipment"
payload = { "shipment_tracking_number": "883163967169" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({shipment_tracking_number: '883163967169'})
};
fetch('https://apirest.sheeping.io/v1/cancel-shipment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apirest.sheeping.io/v1/cancel-shipment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'shipment_tracking_number' => '883163967169'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apirest.sheeping.io/v1/cancel-shipment"
payload := strings.NewReader("{\n \"shipment_tracking_number\": \"883163967169\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apirest.sheeping.io/v1/cancel-shipment")
.header("Content-Type", "application/json")
.body("{\n \"shipment_tracking_number\": \"883163967169\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apirest.sheeping.io/v1/cancel-shipment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"shipment_tracking_number\": \"883163967169\"\n}"
response = http.request(request)
puts response.read_body{
"shipment": {
"internal_id": "1829cc48-9ea9-497f-92c1-6e6aae2885ee",
"creation_date": "2026-01-08T19:27:19.945288",
"modification_date": "2026-01-08T19:27:19.945288",
"label_number": "883163967169",
"tracking_number": "883163967169",
"status": "CANCELLED"
},
"transaction_id": "1829cc48-9ea9-497f-92c1-6e6aae2885ee"
}{
"error": {
"code": "USER_INACTIVE_ERROR",
"message": "Lo sentimos no puedes realizar esta acción debido a que tu cuenta no esta activa, favor de contactar a tu asesor.",
"details": null
},
"transaction_id": "2aefad11-a0f6-4c7d-9601-fdc03309faaf"
}{
"error": {
"code": "SHIPMENT_NO_FOUND",
"message": "Lo sentimos el envio 883163967169 no se encuentra disponible o no existe, favor de contactar a tu asesor.",
"details": null
},
"transaction_id": "a8e0478e-8df8-4746-9e75-aec1e2a60ca6"
}{
"detail": "Método \"GET\" no permitido.",
"status_code": 405
}{
"error": {
"code": "REQUEST_ERROR_406",
"message": "Datos de la solicitud incompletos.",
"details": {
"shipment_tracking_number": [
"Asegúrese de que este campo tenga al menos 3 caracteres."
]
}
},
"transaction_id": "40fda139-b2a6-4bdd-a2e6-55b4f0acecc0"
}{
"error": {
"code": "SHIPMENT_CANNOT_BE_CANCELLED",
"message": "El envío 883163967169 no puede cancelarse porque ya fue cancelado o se encuentra en proceso de entrega.",
"details": null
},
"transaction_id": "2aefad11-a0f6-4c7d-9601-fdc03309faaf"
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Lo sentimos hubo un error inesperado, favor de intentar mas tarde.",
"details": null
},
"transaction_id": "9f091a8a-a214-4c23-8b89-560670c64714"
}{
"error": {
"code": "PROVIDER_TIMEOUT",
"message": "El proveedor está tardando demasiado en responder, favor de intentar mas tarde.",
"details": null
},
"transaction_id": "9f091a8a-a214-4c23-8b89-560670c64714"
}