retryBackorderReservations
Requires permission sales:sales_order:allocate.
Re-reserve the backordered part of confirmed orders after stock arrives. Send orderId to retry one order and warehouseId to limit the retry to one warehouse; with neither, it retries across the organization. Any part that still cannot be covered stays backordered. Needs the sales order allocate permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation RetryBackorderReservations {
retryBackorderReservations {
ordersAffected
reservedCount
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RetryBackorderReservations {\n retryBackorderReservations {\n ordersAffected\n reservedCount\n }\n}"
}
EOF
Response:
{
"data": {
"retryBackorderReservations": {
"ordersAffected": [
"string"
],
"reservedCount": 0
}
}
}
retryBackorderReservations(
orderId: ID
warehouseId: ID
): BackorderRetryResult!
Arguments
retryBackorderReservations.orderId ● ID scalar
The ID of one sales order to retry. Omit to retry every order with a backorder.
retryBackorderReservations.warehouseId ● ID scalar
Limit the retry to this warehouse.
Type
BackorderRetryResult object
The result of retrying the reservation of backordered order lines.