주문 플로우
초안 시뮬레이터
초안을 가상 시계로 돌려 단계마다 도착 상태·지난 연결선·실행했을 블록·걸린 타이머를 준다. 실제 주문·돈·재고는 건드리지 않는다. 식이 읽는 값은 `context`(없으면 견본 주문 값)다. 초안이 없으면 404 `FLOW_DRAFT_NOT_FOUND`.
POST
초안을 가상 시계로 돌려 단계마다 도착 상태·지난 연결선·실행했을 블록·걸린 타이머를 준다. 실제 주문·돈·재고는 건드리지 않는다. 식이 읽는 값은 context(없으면 견본 주문 값)다. 초안이 없으면 404 FLOW_DRAFT_NOT_FOUND.
accessTokenheader
AuthorizationBearer <token>Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)
flowId*stringX-Store-Id*string대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다
application/json- body
startAt?string가상 시계 시작(기본: 지금)
Match
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Format
date-timecontext?식이 읽을 값(item·order·buyer·product). 비우면 견본 주문 값
steps*array<|>Items
1 <= items <= 100성공
application/json- response
meta*data*error*|nullcurl -X POST 'https://api.sayren.io/v1/commerce-flows/string/draft/simulate' \ -H 'X-Store-Id: string' \ -H 'Content-Type: application/json' \ -d '{ "steps": [ { "event": { "type": "start" } } ]}'{ "meta": { "status": 200, "code": "OK", "message": "OK", "isSuccess": true }, "data": { "compiled": true, "errors": [ { "code": "string", "message": "string", "nodeId": "string", "edgeId": "string" } ], "trace": [ { "step": 0, "input": { "property1": null, "property2": null }, "at": "string", "node": "string", "label": "string", "coreStatus": "string", "ended": true, "path": [ "string" ], "blocks": [ "string" ], "timers": [ { "key": "string", "dueAt": "string" } ], "leaves": [ { "node": "string", "kind": "string" } ], "error": "string" } ] }, "error": null}