Requires write_shipping access scope.
For more info, refer to:
POST https://{handle}.myshopline.com/admin/openapi/v20260301/logistics/shipping_zones.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
  • shipping_zonesobject
    Setting area plan object
  • delivery_plansobject[] required
    Multiple zone schemes object
  • area_name string required
    Regional plan name
  • areasobject[] required
    Zones object
  • area_codes array
    Non-country address encoding ( such as province , city )
    Example: [""]
  • country_code string required
    Country code
  • shipping_plansobject[] required
    Shipping information object
  • custom_amount string
    Custom shipping amount ( double type string for accuracy 2 , when chargeMode=3 , for fixed shipping amount )
  • delivery_name string required
    Shipping plan name , shipping name will be displayed to the user to see
  • first_amount string
    Starting amount ( double type string for accuracy 2 ) eg. " 1.08 "
  • conditional_interval integer required
    Conditions range ( 1- none , 2- number of units per Product , 3- weight per order , 4- price per order ) must be within a suitable range [ 1 , 4] eg. 1
  • first_measure string
    Starting volume ( double type string of precision 2 , when chargeMode=2 , must be whole number ) eg : " 1.08 "
  • incr_measure string
    Continued ( double type string for precision 2 ) eg. " 2.01 "
  • intervalsobject[]
    Range object ( when conditionalInterval equals 2、3、4 , must be transferred )
  • custom_amount string
    Custom shipping amount ( double type string for accuracy 2 , when chargeMode=3 , for fixed shipping amount )
  • end_interval string
    End zone ( double type string for accuracy 2 )
  • first_amount string
    Starting amount ( double type string for accuracy 2 ) eg. " 1.08 "
  • first_measure string
    Starting amount ( double type string for accuracy 2 ) eg. " 1.08 "
  • incr_amount string
    Amount of continued ( double type string for precision 2 ) eg. " 1.08 "
  • incr_measure string
    Continued ( double type string for precision 2 ) eg. " 2.01 "
  • measure_unit string
    Unit of measurement ( kg-kg , g-g , lb-lb , oz-oz , when chargeMode=1 , required ) eg. kg
  • start_interval string
    Start zone ( double type string for accuracy 2 )
  • incr_amount string
    Amount of continued ( double type string for precision 2 ) eg. " 1.08 "
  • measure_unit string
    Unit of measurement ( kg-kg , g-g , lb-lb , oz-oz , when chargeMode=1 , required ) eg. kg
  • charge_mode integer required
    Charge mode ( 1- by weight , 3- by-item fee , 4- fixed shipping ) must be within the right range [ 1 , 4 ]
  • group_type integer
    Shipping configuration type ( 1 : general grouping , 2 : custom grouping , default 1 general grouping if not transmitted )
    Example: 1
  • product_group_infoobject
    Item group information
  • product_group_name string
    Product group name , groupType is required when 2 custom grouping ; groupType is default value when 1 general grouping : general grouping
  • product_group_seq string
    Product grouped serial number , required during update , empty add
  • product_ids array
    Product serial number list , groupType is required for 2 custom grouping ( Product spu serial number )
    Example: ["[\"18053690657964710749100412\",\"18055123775710848634010412\"]"]
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
  • shipping_zoneobject
    Shipping plan settings return object
  • is_success boolean
    Success ( true or not : success , false : failure )
  • ext_map map
    Expand information
    Example: {}
  • group_seq string
    Grouping unique serial number
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required

Body

required
{
  "shipping_zones": {
    "delivery_plans": [
      {
        "area_name": "",
        "areas": [
          {
            "area_codes": [
              ""
            ],
            "country_code": ""
          }
        ],
        "shipping_plans": [
          {
            "incr_amount": "",
            "intervals": [
              {
                "incr_amount": "",
                "incr_measure": "",
                "measure_unit": "",
                "start_interval": "",
                "custom_amount": "",
                "end_interval": "",
                "first_amount": "",
                "first_measure": ""
              }
            ],
            "charge_mode": 0,
            "custom_amount": "",
            "measure_unit": "",
            "delivery_name": "",
            "incr_measure": "",
            "first_amount": "",
            "first_measure": "",
            "conditional_interval": 0
          }
        ]
      }
    ],
    "group_type": 1,
    "product_group_info": {
      "product_group_name": "",
      "product_group_seq": "",
      "product_ids": [
        "[\"18053690657964710749100412\",\"18055123775710848634010412\"]"
      ]
    }
  }
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/logistics/shipping_zones.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Was this article helpful to you?