sayren Docs
주문 상품 처리

주문상품 행동 실행

`GET …/flow`의 `actions[]`에 켜져 있는 행동만 실행한다. 받을 수 없으면 409 `ACTION_NOT_AVAILABLE`이다. `Idempotency-Key`로 재시도가 안전하다.

POST
/v1/order-items/{orderItemId}/actions/{key}

GET …/flow의 actions[]에 켜져 있는 행동만 실행한다. 받을 수 없으면 409 ACTION_NOT_AVAILABLE이다. Idempotency-Key로 재시도가 안전하다.

Authorization

accessToken
headerAuthorizationBearer <token>

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

Path Parameters

orderItemId*string
key*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
input?

행동 입력 — 행동의 input 폼 키

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
curl -X POST 'https://api.sayren.io/v1/order-items/string/actions/string' \  -H 'X-Store-Id: string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "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}