OrderCancel
Cancels an order and optionally restocks items and notifies the customer.
Input
| Name | Type | Required | Description |
| NotifyCustomer | Bool | False | Indicates whether a notification is sent to the customer about the order cancellation. |
| OrderId | String | True | The Id of the order to be canceled. |
| Reason | String | True | The reason for canceling the order.
The allowed values are CUSTOMER, DECLINED, FRAUD, INVENTORY, OTHER, STAFF. |
| RefundMethodOriginalPaymentMethodsRefund | Bool | False | Whether to refund to the original payment method. |
| RefundMethodStoreCreditRefundExpiresAt | Datetime | False | Whether to refund to store credit. |
| Restock | Bool | True | Indicates whether the inventory committed to the order is restocked. |
| StaffNote | String | False | A staff-facing note about the order cancellation. Not visible to the customer. |
| WaitJob | Bool | False | Indicates whether the stored procedure waits until the job is complete.
The default value is true. |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | Indicates whether the operation completed successfully. |
| Details | String | Additional details about how the operation was executed. |
| JobID | String | The Id of the job associated with the cancellation. |
| Status | String | The status of the job. |