Run a scenario simulator against one of your orders.
POST
/v1/simulators/{scenario}
const url = 'https://api.staging.elasticstage.com/store/v1/simulators/order_processing';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"order_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.staging.elasticstage.com/store/v1/simulators/order_processing \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "order_id": "example" }'Moves the order as the real event would: its status, shipments and tracking change, and the matching webhooks are sent. Disabled in production, where it returns 403.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”scenario
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
order_id
required
string
Examplegenerated
{ "order_id": "example"}Responses
Section titled “ Responses ”Default Response
Media typeapplication/json
object
scenario
required
string
order_id
required
string
status
required
string
Example
{ "scenario": "order_processing", "status": "pending"}Default Response
Media typeapplication/json
object
statusCode
required
number
code
required
string
error
required
string
message
required
string
details
Array
Example
{ "statusCode": 400, "code": "VALIDATION_ERROR", "error": "Bad Request", "message": "Request validation failed.", "details": [ { "field": "items", "reason": "must contain at least 1 item" } ]}Default Response
Media typeapplication/json
object
statusCode
required
number
code
required
string
error
required
string
message
required
string
details
Array
Example
{ "statusCode": 401, "code": "UNAUTHORIZED", "error": "Unauthorized", "message": "Authentication required."}Default Response
Media typeapplication/json
object
statusCode
required
number
code
required
string
error
required
string
message
required
string
details
Array
Example
{ "statusCode": 403, "code": "FORBIDDEN", "error": "Forbidden", "message": "Insufficient permissions."}Default Response
Media typeapplication/json
object
statusCode
required
number
code
required
string
error
required
string
message
required
string
details
Array
Example
{ "statusCode": 404, "code": "NOT_FOUND", "error": "Not Found", "message": "The requested resource was not found."}Default Response
Media typeapplication/json
object
statusCode
required
number
code
required
string
error
required
string
message
required
string
details
Array
Example
{ "statusCode": 409, "code": "CONFLICT", "error": "Conflict", "message": "Idempotency-Key was already used with a different request body."}Default Response
Media typeapplication/json
object
statusCode
required
number
code
required
string
error
required
string
message
required
string
details
Array
Example
{ "statusCode": 429, "code": "RATE_LIMITED", "error": "Too Many Requests", "message": "Rate limit exceeded."}Default Response
Media typeapplication/json
object
statusCode
required
number
code
required
string
error
required
string
message
required
string
details
Array
Example
{ "statusCode": 500, "code": "INTERNAL_ERROR", "error": "Internal Server Error", "message": "An unexpected error occurred."}Default Response
Media typeapplication/json
object
statusCode
required
number
code
required
string
error
required
string
message
required
string
details
Array
Example
{ "statusCode": 503, "code": "SERVICE_UNAVAILABLE", "error": "Service Unavailable", "message": "The service is temporarily unavailable."}