Order Discount API reference
The Order Discount API enables you to create a new type of discount that is applied to all merchandise in the cart. The API includes two key objects: Input
and FunctionResult
.
The Input
object is the complete schema that your function can receive as input.
For a list of fields that the Order Discount API's Input
object accepts, refer to Input.
The following example shows an input query:
The following example shows the resulting input to the query:
FunctionResult
Anchor link to section titled "FunctionResult"The FunctionResult
object is the shape of the function's output.
The following function result includes one discount of 10% off the order subtotal amount: