Skip to Content
Sayren 유저가이드
주문 플로우

과거 주문 재생

실제 주문상품의 실행 기록(시작·행동·사건·타이머)을 초안으로 다시 돌려 실제로 간 상태와 처음 갈라지는 단계(`divergedAt`)를 찾는다. 상태 직접 이동·버전 옮기기·엔진 밖 취소는 재생하지 않고 그 앞까지만 돌린다(`unsupported`).

POST
/v1/commerce-flows/{flowId}/draft/replay

실제 주문상품의 실행 기록(시작·행동·사건·타이머)을 초안으로 다시 돌려 실제로 간 상태와 처음 갈라지는 단계(divergedAt)를 찾는다. 상태 직접 이동·버전 옮기기·엔진 밖 취소는 재생하지 않고 그 앞까지만 돌린다(unsupported).

Authorization

accessToken
headerAuthorizationBearer <JWT>

Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)

Path Parameters

flowId*string

Header Parameters

X-Store-Id*string

대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다

Request Body

application/json
  1. body
orderItemId*string

재생할 주문상품 — 그 흐름의 실행 기록을 초안으로 다시 돌린다

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
Example Request
curl -X POST 'https://api.sayren.io/v1/commerce-flows/string/draft/replay' \
  -H 'X-Store-Id: string' \
  -H 'Content-Type: application/json' \
  -d '{
  "orderItemId": "string"
}'
Example Response
{
  "meta": {
    "status": 200,
    "code": "OK",
    "message": "OK",
    "isSuccess": true
  },
  "data": {
    "orderItemId": "string",
    "compiled": true,
    "errors": [
      {
        "code": "string",
        "message": "string",
        "nodeId": "string",
        "edgeId": "string",
        "pointer": "string",
        "opIndex": 0,
        "hint": "string",
        "expected": null
      }
    ],
    "steps": [
      {
        "runId": "string",
        "trigger": {
          "property1": null,
          "property2": null
        },
        "recordedState": "string",
        "simulatedState": "string",
        "match": true,
        "error": "string"
      }
    ],
    "divergedAt": 0,
    "unsupported": 0
  },
  "error": null
}