sayren Docs
상품

상품 할인 설정

PUT
/v1/products/{productId}/discount
AuthorizationBearer <token>

userToken(계정 스코프) 또는 storeToken(스토어 스코프)

In: header

Path Parameters

productId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

discountType*string

Value in

  • "RATE"
  • "AMOUNT"
discountValue*integer
Range1 <= value
startAt?string
endAt?string

Response Body

application/json

curl -X PUT "https://example.com/v1/products/string/discount" \  -H "Content-Type: application/json" \  -d '{    "discountType": "RATE",    "discountValue": 1  }'
{  "meta": {    "status": 200,    "code": "OK",    "message": "OK",    "isSuccess": true  },  "data": {    "productId": "string",    "discountType": "RATE",    "discountValue": 0,    "discountedPrice": 0,    "startAt": "string",    "endAt": "string"  },  "error": null}