invalid_state
The order is in the wrong state for this operation
BetaAPI v2 is in public beta: endpoints, fields and behaviour can change before general availability. See the changelog
Last updated
API v2
stoqapp.comAbout STOQContactPrivacy policyHelp center
The order is in the wrong state for this operation
Section titled “The order is in the wrong state for this operation”Code: invalid_state · HTTP status: usually 409
The order’s current state rules this operation out, such as releasing a cancelled order.
How to fix
Section titled “How to fix”Read the order to see its state. Some operations accept force: true; the action’s /help notes say which.
Example response
Section titled “Example response”{ "code": "invalid_state", "type": "https://docs.stoqapp.com/v2/docs/api-v2/errors/invalid-state/", "title": "The order is in the wrong state for this operation", "status": 409, "detail": "Cannot release: order is already cancelled. Read the order to see its state. Some operations accept `force: true`; the action's /help notes say which.", "errors": [ "Cannot release: order is already cancelled." ], "details": [ { "code": "invalid_state", "message": "Cannot release: order is already cancelled.", "path": null, "value": null, "expected": null } ]}Every API v2 and MCP failure carries code and a type link to its page here. See Errors & Responses for the full envelope.
Was this page helpful?
Thanks for letting us know.
Still stuck? Ask Quinn or chat with support