Edit in GitHubLog an issue
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 clipboard
mutation {
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 clipboard
mutation {
validatePurchaseOrders(
input: {
purchase_order_uids: ["Nw==", "OA=="]
}
) {
purchase_orders {
number
status
}
errors {
message
type
}
}
}

Response:

Copied to your clipboard
{
"data": {
"validatePurchaseOrders": {
"purchase_orders": [
{
"number": "000000007",
"status": "APPROVAL_REQUIRED"
},
{
"number": "000000008",
"status": "APPROVAL_REQUIRED"
}
],
"errors": []
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.