Get allowed status transitions
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/orders/1/allowed-transitions';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/stores/example/orders/1/allowed-transitions \ --header 'x-api-key: <x-api-key>'Returns the order’s current statuses and, for each of order, fulfillment, shipping and payment status, the statuses an update would accept right now. The lists apply the same state machine and guards as the update route, so a status that is not listed is refused. When no order has this ID in the store the response is 200 with an empty body.
Required scopes: read:orders
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The order ID.
The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”The current statuses and the allowed next statuses. The body is empty when no order has this ID in the store.
object
The order’s current statuses.
object
Lifecycle status.
Fulfillment status.
Shipping status.
Payment status.
For each status dimension, the statuses the order may move to now.
object
Lifecycle statuses the order may move to.
Fulfillment statuses the order may move to.
Shipping statuses the order may move to.
Payment statuses the order may move to.
Example
{ "current": { "order_status": "pending", "fulfillment_status": "unfulfilled", "shipping_status": "not_shipped", "payment_status": "pending" }, "allowed_transitions": { "order_status": [ "pending" ], "fulfillment_status": [ "unfulfilled" ], "shipping_status": [ "not_shipped" ], "payment_status": [ "pending" ] }}The request is malformed or failed validation.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}