B2B feature. Learn more
validatePurchaseOrders mutation
By default, Adobe Commerce validates purchase orders automatically. However, purchase orders can become stuck in certain circumstances, such as when the message queue system is down and the purchase order is in the PENDING state. You might need to run the validatePurchaseOrders
mutation to manually validate purchase orders.
You must specify one or more purchase order UIDs as input.
Syntax
Copied to your clipboardmutation {validatePurchaseOrders(input: ValidatePurchaseOrdersInput!) {ValidatePurchaseOrdersOutput}}
Reference
The validatePurchaseOrders
reference provides detailed information about the types and fields defined in this mutation.
Headers
A valid customer authentication token is required.
Example usage
The following example validates purchase orders.
Request:
Copied to your clipboardmutation {validatePurchaseOrders(input: {purchase_order_uids: ["Nw==", "OA=="]}) {purchase_orders {numberstatus}errors {messagetype}}}
Response:
Copied to your clipboard{"data": {"validatePurchaseOrders": {"purchase_orders": [{"number": "000000007","status": "APPROVAL_REQUIRED"},{"number": "000000008","status": "APPROVAL_REQUIRED"}],"errors": []}}}