주문 상품 처리
주문상품 행동 실행
`GET …/flow`의 `actions[]`에 켜져 있는 행동만 실행한다. 받을 수 없으면 409 `ACTION_NOT_AVAILABLE`이다. `Idempotency-Key`로 재시도가 안전하다.
POST
GET …/flow의 actions[]에 켜져 있는 행동만 실행한다. 받을 수 없으면 409 ACTION_NOT_AVAILABLE이다. Idempotency-Key로 재시도가 안전하다.
accessTokenheader
AuthorizationBearer <JWT>Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)
orderItemId*stringkey*stringX-Store-Id*string대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다
idempotency-key?string멱등키. 같은 키로 다시 보내면 처음 결과를 돌려주고 한 번만 적용한다. 재시도에는 같은 키를 쓴다
Length
length <= 255application/json- body
input?행동 입력 — 행동의 input 폼 키
성공
application/json- response
meta*data*error*|nullcurl -X POST 'https://api.sayren.io/v1/order-items/string/actions/string' \
-H 'X-Store-Id: string' \
-H 'Content-Type: application/json' \
-d '{}'Example Response
{
"meta": {
"status": 200,
"code": "OK",
"message": "OK",
"isSuccess": true
},
"data": {
"status": "COMPLETED",
"flowState": {
"key": "string",
"label": "string",
"labelKey": "string",
"coreStatus": "PAYMENT_WAITING",
"claimStatus": "REQUESTED",
"message": "string",
"messageKey": "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",
"labelKey": "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
}