sayren Docs
상품

상품 옵션 전체 교체

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

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

In: header

Path Parameters

productId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

optionGroups?array<>
Itemsitems <= 3
Default[]
variants*array<>
Items1 <= items <= 500

Response Body

application/json

curl -X PUT "https://example.com/v1/products/string/options" \  -H "Content-Type: application/json" \  -d '{    "variants": [      {}    ]  }'
{  "meta": {    "status": 200,    "code": "OK",    "message": "OK",    "isSuccess": true  },  "data": {    "optionGroups": [      {        "groupId": "string",        "name": "string",        "sortOrder": 0,        "values": [          {            "valueId": "string",            "name": "string",            "sortOrder": 0          }        ]      }    ],    "variants": [      {        "variantId": "string",        "valueIds": [          "string"        ],        "name": "string",        "additionalPrice": 0,        "stockQuantity": 0,        "sku": "string",        "barcode": "string",        "costPrice": 0,        "weightGram": 0,        "sellerCode": "string",        "usable": true      }    ]  },  "error": null}