sayren Docs
상품

상품 달력 설정

기간(포함, 최대 400일)의 날짜마다 조합별 재고·가격을 덮어쓴다(없는 날은 만든다). `daysOfWeek`로 요일만 고를 수 있다. `price: null`은 조합 가격으로 되돌린다.

PUT
/v1/products/{productId}/calendar

기간(포함, 최대 400일)의 날짜마다 조합별 재고·가격을 덮어쓴다(없는 날은 만든다). daysOfWeek로 요일만 고를 수 있다. price: null은 조합 가격으로 되돌린다.

Authorization

accessToken
headerAuthorizationBearer <token>

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

Path Parameters

productId*string

Header Parameters

X-Store-Id*string

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

Request Body

application/json
  1. body
variantIds*array<string>
Items1 <= items <= 50
from*string

한국 날짜(YYYY-MM-DD)

Match^\d{4}-\d{2}-\d{2}$
to*string

한국 날짜(YYYY-MM-DD)

Match^\d{4}-\d{2}-\d{2}$
stock?integer
Range0 <= value <= 100000
price?|
Multiple Of10
Range0 <= value
daysOfWeek?array<>
Items1 <= items <= 7

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
curl -X PUT 'https://api.sayren.io/v1/products/string/calendar' \  -H 'X-Store-Id: string' \  -H 'Content-Type: application/json' \  -d '{  "variantIds": [    "string"  ],  "from": "string",  "to": "string"}'
{  "meta": {    "status": 200,    "code": "OK",    "message": "OK",    "isSuccess": true  },  "data": {    "updated": 0  },  "error": null}