Storefront GraphQL APIReferenceMutations
Cancel Order
MUTATION
cancelOrder(input: CancelOrderInput!): StorefrontOrder!Arguments
input*Returns
- cancelOrder
_id*ID!tenant?StringinvoiceUID?StringshippingAddress?note?StringrejectionReason?StringpaymentStatus?PAYMENT_STATUSValue in
PROCESSINGPAIDCANCELLEDFAILEDUNATTEMPTEDEXPIREDinvoiceStatus?INVOICE_STATUSValue in
PENDINGPROCESSINGREJECTEDCANCELLEDSHIPMENT_IN_PROGRESSSHIPMENT_IN_TRANSITSHIPMENT_DELIVEREDpaymentMethod?INVOICE_PAYMENT_METHODValue in
CODONLINEpaymentProvider?PAYMENT_PROVIDERValue in
BKASHSSLCOMMERZpaymentTransactionId?StringpaymentSuccessUrl?StringpaymentFailUrl?StringpaymentCancelUrl?StringpaidAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
customer?vendor?lineItems?subTotalAmount?FloatnetTotalAmount?FloattaxRate?FloattaxAmount?FloatdeliveryCharge?FloatcouponCode?StringcouponDiscount?FloatTotal of all discounts on the order. Kept for older clients; equals discountTotal.
discountApplications?discountTotal?FloatshippingDiscount?FloatPart of discountTotal that came off the delivery charge.
deliveryArea?StringdeliverySubArea?StringwebhookEvent?StringLatest Graphland PGW webhook event as JSON string. Parse with JSON.parse on the client.
createdAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
updatedAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
shipment?customFields?Example Request
mutation CancelOrder($input: CancelOrderInput!) { cancelOrder(input: $input) { _id tenant invoiceUID shippingAddress { lat lng caption } note rejectionReason paymentStatus invoiceStatus paymentMethod customer { referenceId name email phoneNumber } }}{ "input": { "orderId": "1" }}{ "data": { "cancelOrder": { "_id": "1", "tenant": "string", "invoiceUID": "string", "shippingAddress": { "lat": 10.5, "lng": 10.5, "caption": "string" }, "note": "string", "rejectionReason": "string", "paymentStatus": "PROCESSING", "invoiceStatus": "PENDING", "paymentMethod": "COD", "customer": { "referenceId": "1", "name": "string", "email": "string", "phoneNumber": "string" } } }}