跳至内容
ShopentlyLearn

创建 · 选项 — 变体与选项

添加规格定义和值。

POST/api/v1/variant-options

cURL 请求

curl --disable --globoff --fail-with-body --silent --show-error \
  --proto '=https' --connect-timeout 5 --max-time 30 \
  --request POST \
  --url https://shop.onshopently.com/api/v1/variant-options \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
  --header 'Idempotency-Key: example-create_variant_option_api_v1_variant_options_post' \
  --header 'Content-Type: application/json' \
  --data-raw '{"name":"Example"}'

响应

{
  "data": {
    "deleted": false,
    "id": "example",
    "version": 1
  },
  "meta": {
    "request_id": "example"
  }
}

所需权限

身份验证
访问令牌
最低套餐
STANDARD
密钥权限
创建规格catalog.variant_option:create