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 label Id that is being voided.
The VoidLabelWithLabelId
method returns an object that indicates the status of the void label request.
You can view the properties here VoidLabelWithLabelId.Result
.
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;
}
}
}
{
{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"
}