Skip to Content
Sayren 유저가이드
재고

재고 부족 설정 저장

PUT
/v1/inventory/low-stock-settings

Authorization

accessToken
headerAuthorizationBearer <JWT>

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

Header Parameters

X-Store-Id*string

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

Request Body

application/json
  1. body
defaultThreshold*|
Range0 <= value <= 1000000
scope*string

재고 부족 판정 방식 — TOTAL 위치 합계 · PER_LOCATION 위치별 각각

Value in"TOTAL""PER_LOCATION"

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
Example Request
curl -X PUT 'https://api.sayren.io/v1/inventory/low-stock-settings' \
  -H 'X-Store-Id: string' \
  -H 'Content-Type: application/json' \
  -d '{
  "defaultThreshold": 0,
  "scope": "TOTAL"
}'
Example Response
{
  "meta": {
    "status": 200,
    "code": "OK",
    "message": "OK",
    "isSuccess": true
  },
  "data": {
    "defaultThreshold": 0,
    "scope": "TOTAL"
  },
  "error": null
}