MutationOrderCancellation · Magento 2.4.9
confirmCancelOrder
confirmCancelOrder is a Magento 2 GraphQL mutation in the OrderCancellation module. Cancel the specified guest customer order. It returns CancelOrderOutput and requires an Authorization header (Bearer customer token).
Last verified: against Magento 2.4.9.
Returns
Resolver class
Magento\OrderCancellationGraphQl\Model\Resolver\ConfirmCancelOrder
Arguments
Example request
Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.
Headers
Query
mutation ($input: ConfirmCancelOrderInput!) {
confirmCancelOrder(input: $input) {
error
order {
gift_message {
to
from
message
}
id
order_date
status
number
items {
gift_message { ... }
id
product_name
product_sku
product_url_key
product_type
status
product_sale_price { ... }
discounts { ... }
selected_options { ... }
entered_options { ... }
quantity_ordered
quantity_shipped
quantity_refunded
quantity_invoiced
quantity_canceled
quantity_returned
product { ... }
prices { ... }
}
total {
subtotal { ... }
discounts { ... }
total_tax { ... }
taxes { ... }
grand_total { ... }
base_grand_total { ... }
total_shipping { ... }
shipping_handling { ... }
subtotal_incl_tax { ... }
subtotal_excl_tax { ... }
grand_total_excl_tax { ... }
}
invoices {
id
number
total { ... }
items { ... }
comments { ... }
}
shipments {
id
number
tracking { ... }
items { ... }
comments { ... }
}
credit_memos {
id
number
items { ... }
total { ... }
comments { ... }
}
payment_methods {
name
type
additional_data { ... }
}
shipping_address {
firstname
lastname
middlename
region
region_id
country_code
street
company
telephone
fax
postcode
city
prefix
suffix
vat_id
}
billing_address {
firstname
lastname
middlename
region
region_id
country_code
street
company
telephone
fax
postcode
city
prefix
suffix
vat_id
}
carrier
shipping_method
comments {
timestamp
message
}
increment_id
order_number
created_at
grand_total
token
applied_coupons {
code
}
email
is_virtual
available_actions
customer_info {
firstname
lastname
middlename
prefix
suffix
}
order_status_change_date
}
errorV2 {
message
code
}
}
}Variables
{
"input": {
"confirmation_key": "",
"order_id": ""
}
}Related in OrderCancellationGraphQl
Other fields shipped by the same module.
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.