ShipEngine allows you to attempt to void a previously purchased label. Please see our docs to learn more about voiding a label.
The voidLabelWithLabelId
method accepts a string that contains the labelId
that is being voided.
The voidLabelWithLabelId
method returns an object that indicates the status of the void label request.
import com.shipengine.ShipEngine;
public class ShipEngineDemo {
public static void main() {
ShipEngine shipengine = new ShipEngine("<YOUR_API_KEY_HERE>");
Map<String, String> result = shipengine.voidLabelWithLabelId("se-1234");
System.out.println("result = " + result);
}
}
{approved=true, message=This label has been voided.}
{
"approved": true,
"message": "This label has been voided."
}
- This method will only throw an exception that is an instance/extension of ShipEngineException if there is a problem if a problem occurs, such as a network error or an error response from the API.