Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.37 KB

VoidLabelWithLabelId.md

File metadata and controls

55 lines (40 loc) · 1.37 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 label Id that is being voided.

Output

The VoidLabelWithLabelId method returns an object that indicates the status of the void label request. You can view the properties here VoidLabelWithLabelId.Result.

Example

using ShipEngineSDK;
using ShipEngineSDK.VoidLabelWithLabelId;
using System.Threading.Tasks;
using System;

public class Example
{

  public async Task<Result> VoidLabelWithLabelId()
  {
    var shipEngine = new ShipEngine("api_key");

    try
    {
      var result = await shipEngine.VoidLabelWithLabelId("se-81208131");
      return result;
    }
    catch (ShipEngineException e)
    {
      Console.WriteLine("Error validating address");
      throw e;
    }
  }

}

Example Output

Successful Address Validation

{
  {Result}
    Approved: false
    Message: "Failed to refund label. Refund already in process Common Activities exception Exception with  code 0x005f030b; module 95, category 3, item 11"
}