Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.29 KB

void-label-with-label-id.md

File metadata and controls

50 lines (39 loc) · 1.29 KB

Void Label With Label Id

ShipEngine allows you to attempt to void a previously purchased label. Please see our docs to learn more about voiding a label.

Input Parameters

The voidLabelWithLabelId method accepts a string that contains the labelId that is being voided.

Output

The voidLabelWithLabelId method returns an object that indicates the status of the void label request.

Example

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);
    }
} 

Example Output

Successful Address Validation

{approved=true, message=This label has been voided.}

JSON Output for reference:

{
  "approved": true,
  "message": "This label has been voided."
}

Exceptions

  • 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.