Requires write_selling_plan_group access scope.
For more info, refer to:
PUT https://{handle}.myshopline.com/admin/openapi/v20260301/selling_plan_groups/selling_plan_group.json
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .
Request Headers
  • Content-Type string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
  • options array
    List of sales plan group options
    Example: ["[\"delivery every 1 months\", \"delivery every 2 months\", \"delivery every 3 months\"]"]
  • position integer
    Display position , the smaller the more front
    Example: 1
  • selling_plans_to_createobject[]
    List of sales plans created
  • position integer
    Display position , the smaller the more front
    Example: 1
  • pricing_policiesobject[]
    Price policy
  • policy_type string
    Strategy type , FIXED : fixed price strategy
  • fixedobject
    Fixed price strategy content , required when type is fixed
  • adjustment_type string
    Discount type , FIXED_AMOUNT : minus , PERCENTAGE : discount ( minus percentage )
  • adjustment_valueobject
    Discount value
  • fixed_value string
    Deduction amount value range : [ 0 , 99999999999.99] precision reserved two decimal 4 and 5 in
  • percentage string
    Deduction percentage value range : [ 0 , 100] precision retention whole number 4 , 5 in
  • billing_policyobject
    Billing strategy
  • policy_type string
    Strategy type : RECURRING - periodic billing strategy
    Example: RECURRING
  • recurringobject
    Periodic billing strategy
  • interval string
    Billing frequency unit : DAY、MONTH、WEEK、YEAR , default MONTH
    Example: DAY
  • interval_count integer
    Billing interval , default is 1
    Example: 10
  • max_cycles integer
    Maximum billing cycle
    Example: 1
  • min_cycles integer
    Minimum billing cycle
    Example: 1
  • description string
    Description of sales plan to show to buyers
    Example: This is a description
  • name string
    Name of sales plan to show to buyers
    Example: delivery every 1 weeks
  • options array
    List of sales plan options
    Example: ["[\"Delivery every 10 days\"]"]
  • merchant_code string
    Show the name to the seller
    Example: Subscription plan group default name
  • selling_plans_to_delete array
    Sales plan to be removed from the sales plan group
    Example: ["[\"14156213099368001129070062\"]"]
  • selling_plans_to_updateobject[]
    Updated selling plan list
  • pricing_policiesobject[]
    Price policy
  • policy_type string
    Strategy type : FIXED - fixed price strategy
    Example: FIXED
  • fixedobject
    Fixed price policy content
  • adjustment_type string
    Discount type : FIXED_AMOUNT- minus , PERCENTAGE- discount
    Example: FIXED_AMOUNT
  • adjustment_valueobject
    Discount value
  • fixed_value string
    Deduction amount , value range : [ 0 , 99999999999.99] , precision retention of two decimal 4 and 5 in
    Example: 10
  • percentage string
    Deduction percentage , value range : [ 0 , 100] , precision retention whole number , rounding
    Example: 10.5
  • billing_policyobject
    Billing strategy
  • policy_type string
    Strategy type : RECURRING- periodic billing strategy
    Example: RECURRING
  • recurringobject
    Periodic billing strategy
  • min_cycles integer
    Minimum billing cycle
    Example: 1
  • interval string
    Billing frequency unit : DAY、MONTH、WEEK、YEAR , default MONTH
    Example: DAY
  • interval_count integer
    Billing interval , default is 1
    Example: 10
  • max_cycles integer
    Maximum billing cycle
    Example: 1
  • description string
    Description of sales plan to show to buyers
    Example: This is a description
  • id string required
    Sales plan id
    Example: 14156213099368001129110062
  • name string
    Name of sales plan to show to buyers
    Example: delivery every 1 weeks
  • options array
    List of sales plan options
    Example: ["[\"Delivery every 10 days\"]"]
  • position integer
    Display position , the smaller the more front
    Example: 1
  • description string
    Show the description to the seller
    Example: This is the description
  • id string required
    Sales plan group id
    Example: 14056200245844372441100008
  • name string required
    Name of sales plan group to show buyers
    Example: Subscription plan group default name
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • traceId
    A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
  • selling_plan_groupobject
    Sales plan group
  • options array
    List of sales plan group options
    Example: ["[\"delivery every 1 months\", \"delivery every 2 months\", \"delivery every 3 months\"]"]
  • product_ids array
    Product id list for binding
    Example: ["[\"16057039432335097907370282\"]"]
  • position integer
    Display position , the smaller the more front
    Example: 1
  • selling_plansobject[]
    Sales plan list
  • options array
    List of sales program options
    Example: ["[\"Delivery every 10 days\"]"]
  • position integer
    Display position , the smaller the more front
    Example: 1
  • pricing_policiesobject[]
    Price policy
  • fixedobject
    Fixed price policy content
  • adjustment_type string
    Discount type , FIXED_AMOUNT : minus , PERCENTAGE : discount ( minus percentage )
    Example: FIXED_AMOUNT
  • adjustment_valueobject
    Discount value
  • fixed_value string
    Deduction amount value range : [ 0 , 99999999999.99] precision reserved two decimal 4 and 5 in
    Example: 10
  • percentage string
    Deduction percentage value range : [ 0 , 100] precision retention whole number 4 , 5 in
    Example: 10.5
  • policy_type string
    Strategy type : FIXED- fixed price strategy
    Example: FIXED
  • billing_policyobject
    Billing strategy
  • policy_type string
    Strategy type : RECURRING- periodic billing strategy
    Example: RECURRING
  • recurringobject
    Periodic billing strategy
  • interval string
    Billing frequency unit : DAY、MONTH、WEEK、YEAR , default MONTH
    Example: DAY
  • interval_count integer
    Billing interval , default is 1
    Example: 10
  • max_cycles integer
    Maximum billing cycle
    Example: 1
  • min_cycles integer
    Minimum billing cycle
    Example: 1
  • description string
    Description of sales plan to show to buyers
    Example: This is a description
  • id string
    Sales plan id
    Example: 14156200245844372441120009
  • name string
    Name of sales plan to show to buyers
    Example: delivery every 1 weeks
  • description string
    Show the description to the seller
    Example: This is the description
  • id string
    Sales plan group id
    Example: 14056200245844372441100009
  • app_id string
    Sales channel id
    Example: c41ac9e6736785502d2333d1b1153aca795075c4
  • name string
    Name of sales plan group to show buyers
    Example: delivery every 1 weeks
  • merchant_code string
    Show the name to the seller
    Example: Subscription plan group default name
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required

Body

required
{
  "merchant_code": "Subscription plan group default name",
  "position": 1,
  "selling_plans_to_create": [
    {
      "position": 1,
      "pricing_policies": [
        {
          "fixed": {
            "adjustment_value": {
              "fixed_value": "",
              "percentage": ""
            },
            "adjustment_type": ""
          },
          "policy_type": ""
        }
      ],
      "billing_policy": {
        "policy_type": "RECURRING",
        "recurring": {
          "min_cycles": 1,
          "interval": "DAY",
          "interval_count": 10,
          "max_cycles": 1
        }
      },
      "description": "This is a description",
      "name": "delivery every 1 weeks",
      "options": [
        "[\"Delivery every 10 days\"]"
      ]
    }
  ],
  "description": "This is the description",
  "name": "Subscription plan group default name",
  "options": [
    "[\"delivery every 1 months\", \"delivery every 2 months\", \"delivery every 3 months\"]"
  ],
  "selling_plans_to_delete": [
    "[\"14156213099368001129070062\"]"
  ],
  "selling_plans_to_update": [
    {
      "description": "This is a description",
      "id": "14156213099368001129110062",
      "name": "delivery every 1 weeks",
      "options": [
        "[\"Delivery every 10 days\"]"
      ],
      "position": 1,
      "pricing_policies": [
        {
          "fixed": {
            "adjustment_type": "FIXED_AMOUNT",
            "adjustment_value": {
              "fixed_value": "10",
              "percentage": "10.5"
            }
          },
          "policy_type": "FIXED"
        }
      ],
      "billing_policy": {
        "policy_type": "RECURRING",
        "recurring": {
          "min_cycles": 1,
          "interval": "DAY",
          "interval_count": 10,
          "max_cycles": 1
        }
      }
    }
  ],
  "id": "14056200245844372441100008"
}

Language

curl --request PUT \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/selling_plan_groups/selling_plan_group.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Update
Request
{
"name": "Subscription plan group default name",
"selling_plans_to_update": [
{
"options": [
"Delivery every 3 weeks"
],
"position": "1",
"pricing_policies": [
{
"fixed": {
"adjustment_type": "FIXED_AMOUNT",
"adjustment_value": {
"fixed_value": "10",
"percentage": "10.5"
}
},
"policy_type": "FIXED"
}
],
"billing_policy": {
"policy_type": "RECURRING",
"recurring": {
"interval": "DAY",
"interval_count": "10",
"max_cycles": "1",
"min_cycles": "1"
}
},
"description": "This is a description",
"id": "14160881435226695358253144",
"name": "delivery every 3 weeks"
}
],
"description": "This is a description",
"merchant_code": "Subscription plan group default name\t",
"selling_plans_to_create": [
{
"position": "1",
"pricing_policies": [
{
"fixed": {
"adjustment_type": "FIXED_AMOUNT",
"adjustment_value": {
"fixed_value": "10",
"percentage": "10.5"
}
},
"policy_type": "FIXED"
}
],
"billing_policy": {
"policy_type": "RECURRING",
"recurring": {
"interval": "DAY",
"interval_count": "10",
"max_cycles": "1",
"min_cycles": "1"
}
},
"description": "This is a description",
"name": "delivery every 2 weeks",
"options": [
"Delivery every 2 weeks"
]
}
],
"options": [
"delivery every 1 months"
],
"position": "1",
"id": "14060881435226695358213144",
"selling_plans_to_delete": [
"14160881435226695358233144"
]
}
Response
{
"selling_plan_group": {
"id": "14060881435226695358213144",
"merchant_code": "Subscription plan group default name\t",
"options": [
"delivery every 1 months"
],
"product_ids": [
"16060878906566210188893144"
],
"selling_plans": [
{
"billing_policy": {
"policy_type": "RECURRING",
"recurring": {
"max_cycles": 1,
"min_cycles": 1,
"interval": "DAY",
"interval_count": 10
}
},
"description": "This is a description",
"id": "14160881435226695358253144",
"name": "delivery every 3 weeks",
"options": [
"Delivery every 3 weeks"
],
"position": 1,
"pricing_policies": [
{
"fixed": {
"adjustment_type": "FIXED_AMOUNT",
"adjustment_value": {
"fixed_value": "10.00"
}
},
"policy_type": "FIXED"
}
]
},
{
"billing_policy": {
"policy_type": "RECURRING",
"recurring": {
"max_cycles": 1,
"min_cycles": 1,
"interval": "DAY",
"interval_count": 10
}
},
"description": "This is a description",
"id": "14160881492658964472013144",
"name": "delivery every 2 weeks",
"options": [
"Delivery every 2 weeks"
],
"position": 1,
"pricing_policies": [
{
"fixed": {
"adjustment_type": "FIXED_AMOUNT",
"adjustment_value": {
"fixed_value": "10.00"
}
},
"policy_type": "FIXED"
}
]
}
],
"app_id": "111afe2f9baceb93004af92b1276582619f1db26",
"description": "This is a description",
"name": "Subscription plan group default name",
"position": 1
}
}
Was this article helpful to you?