B2B feature. Learn more
cancelPurchaseOrders mutation
The cancelPurchaseOrders
mutation cancels the specified purchase orders. If the request is successful, the status of each purchase order is CANCELED
.
Syntax
Copied to your clipboardmutation {cancelPurchaseOrders(input: PurchaseOrdersActionInput!) {PurchaseOrdersActionOutput}}
Reference
The cancelPurchaseOrders
reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following example cancels purchase orders.
Request:
Copied to your clipboardmutation {cancelPurchaseOrders(input: {purchase_order_uids: ["NQ=="]}) {purchase_orders {numberstatus}errors {messagetype}}}
Response:
Copied to your clipboard{"data": {"cancelPurchaseOrders": {"purchase_orders": [{"number": "000000005","status": "CANCELED"}],"errors": []}}}