sayren Docs
주문 상품 처리

주문상품 상태 직접 이동

연결선을 지나지 않고 다른 상태로 옮긴다(조치 필요 해소, 잘못 누른 행동 되돌리기). 연결선의 블록(재고·환불·송장)은 실행하지 않고 도착 상태의 타이머만 다시 건다. 옮길 수 있는 상태는 `GET …/flow`의 `moveTargets`다. 취소 상태로는 옮기지 않는다(직권취소를 쓴다). 옮길 수 없으면 409 `FLOW_MOVE_NOT_ALLOWED`(`details.reason`). `Idempotency-Key`로 재시도가 안전하다.

POST
/v1/order-items/{orderItemId}/flow/move

연결선을 지나지 않고 다른 상태로 옮긴다(조치 필요 해소, 잘못 누른 행동 되돌리기). 연결선의 블록(재고·환불·송장)은 실행하지 않고 도착 상태의 타이머만 다시 건다. 옮길 수 있는 상태는 GET …/flow의 moveTargets다. 취소 상태로는 옮기지 않는다(직권취소를 쓴다). 옮길 수 없으면 409 FLOW_MOVE_NOT_ALLOWED(details.reason). Idempotency-Key로 재시도가 안전하다.

Authorization

accessToken
headerAuthorizationBearer <token>

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

Path Parameters

orderItemId*string

Header Parameters

X-Store-Id*string

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

idempotency-key?string

멱등키. 같은 키로 다시 보내면 처음 결과를 돌려주고 한 번만 적용한다. 재시도에는 같은 키를 쓴다

Lengthlength <= 255

Request Body

application/json
  1. body
to*string

옮길 상태 키(moveTargets[].key)

Length1 <= length
reason?string

옮긴 사유(실행 기록에 남는다)

Lengthlength <= 200

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
curl -X POST 'https://api.sayren.io/v1/order-items/string/flow/move' \  -H 'X-Store-Id: string' \  -H 'Content-Type: application/json' \  -d '{  "to": "string"}'
{  "meta": {    "status": 200,    "code": "OK",    "message": "OK",    "isSuccess": true  },  "data": {    "status": "COMPLETED",    "flowState": {      "key": "string",      "label": "string",      "coreStatus": "PAYMENT_WAITING",      "claimStatus": "REQUESTED",      "message": "string",      "enteredAt": "string",      "deadlineAt": "string",      "attachments": [        "string"      ],      "earlierAttachments": [        "string"      ],      "inputs": {        "by": "string",        "values": [          {            "key": "string",            "label": "string",            "type": "string",            "value": "string",            "display": "string"          }        ]      },      "progress": true,      "fields": {        "property1": "string",        "property2": "string"      }    },    "actions": [      {        "key": "string",        "label": "string",        "mode": "INSTANT",        "enabled": true,        "disabled": {          "reason": "string",          "message": "string"        },        "availableUntil": "string",        "subflow": "string",        "input": [          {            "key": "string",            "type": "string",            "required": true,            "label": "string",            "placeholder": "string",            "maxLength": 0,            "maxFiles": 0,            "options": [              "string"            ],            "when": {              "key": "string",              "in": [                "string"              ]            }          }        ],        "partialQuantity": true,        "attachments": "REQUIRED"      }    ],    "affectedOrderItemIds": [      "string"    ]  },  "error": null}