Shipping Discount API reference
The Shipping Discount API enables you to create a new type of discount that is applied to one or more shipping rates at checkout. The API includes two key objects:
FunctionResultAnchor link to section titled "FunctionResult"
The following function result includes one free shipping discount: