---
title: "Batch shipping plan"

doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/order/shipping-and-fulfillment/batch-shipping-plan'
  md: 'https://developer.shopline.com/docs/admin-rest-api/order/shipping-and-fulfillment/batch-shipping-plan.md'
---
# Batch shipping plan

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `write_shipping`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
POST /logistics/shipping_zones.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `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` .

## Required Permissions

* `write_shipping`

## Request

### 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](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

### Request Body

* `shipping_zones`

  object

  Setting area plan object

  * `delivery_plans`

    array<object>

    Multiple zone schemes object

    * `area_name`

      string

      Regional plan name

    * `areas`

      array<object>

      Zones object

      * `area_codes`

        array<string>

        Non-country address encoding ( such as province , city )

      * `country_code`

        string

        Country code

    * `shipping_plans`

      array<object>

      Shipping information object

      * `intervals`

        array<object>

        Range object ( when conditionalInterval equals 2、3、4 , must be transferred )

      * `charge_mode`

        integer

        Charge mode ( 1- by weight , 3- by-item fee , 4- fixed shipping ) must be within the right range [ 1 , 4 ]

      * `delivery_name`

        string

        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

        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

      * `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

      * `custom_amount`

        string

        Custom shipping amount ( double type string for accuracy 2 , when chargeMode=3 , for fixed shipping amount )

      * `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 "

  * `group_type`

    integer

    Shipping configuration type ( 1 : general grouping , 2 : custom grouping , default 1 general grouping if not transmitted )

  * `product_group_info`

    object

    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<string>

      Product serial number list , groupType is required for 2 custom grouping ( Product spu serial number )

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### 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

#### 200

* `shipping_zone`

  object

  Shipping plan settings return object

  * `is_success`

    boolean

    Success ( true or not : success , false : failure )

  * `ext_map`

    map

    Expand information

  * `group_seq`

    string

    Grouping unique serial number


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "externalDocs": {
    "description": "Permission point used by the interface is `write_shipping` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "3Ho39wGs",
  "parameters": [
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API. Please refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "shipping_zones": {
              "name": "shipping_zones",
              "description": "Setting area plan object",
              "type": "object",
              "properties": {
                "delivery_plans": {
                  "name": "delivery_plans",
                  "description": "Multiple zone schemes object",
                  "type": "array",
                  "items": {
                    "name": "delivery_plans",
                    "description": "Multiple zone schemes object",
                    "type": "object",
                    "properties": {
                      "area_name": {
                        "name": "area_name",
                        "description": "Regional plan name",
                        "type": "string",
                        "example": ""
                      },
                      "areas": {
                        "name": "areas",
                        "description": "Zones object",
                        "type": "array",
                        "items": {
                          "name": "areas",
                          "description": "Zones object",
                          "type": "object",
                          "properties": {
                            "area_codes": {
                              "name": "area_codes",
                              "description": "Non-country address encoding ( such as province , city )",
                              "type": "array",
                              "items": {
                                "name": "area_codes",
                                "description": "Non-country address encoding ( such as province , city )",
                                "type": "string",
                                "example": ""
                              },
                              "example": [
                                ""
                              ]
                            },
                            "country_code": {
                              "name": "country_code",
                              "description": "Country code",
                              "type": "string",
                              "example": ""
                            }
                          },
                          "required": [
                            "country_code"
                          ],
                          "example": {
                            "country_code": "",
                            "area_codes": [
                              ""
                            ]
                          }
                        },
                        "example": [
                          {
                            "country_code": "",
                            "area_codes": [
                              ""
                            ]
                          }
                        ]
                      },
                      "shipping_plans": {
                        "name": "shipping_plans",
                        "description": "Shipping information object",
                        "type": "array",
                        "items": {
                          "name": "shipping_plans",
                          "description": "Shipping information object",
                          "type": "object",
                          "properties": {
                            "intervals": {
                              "name": "intervals",
                              "description": "Range object ( when conditionalInterval equals 2、3、4 , must be transferred )",
                              "type": "array",
                              "items": {
                                "name": "intervals",
                                "description": "Range object ( when conditionalInterval equals 2、3、4 , must be transferred )",
                                "type": "object",
                                "properties": {
                                  "start_interval": {
                                    "name": "start_interval",
                                    "description": "Start zone ( double type string for accuracy 2 )",
                                    "type": "string",
                                    "example": ""
                                  },
                                  "custom_amount": {
                                    "name": "custom_amount",
                                    "description": "Custom shipping amount ( double type string for accuracy 2 , when chargeMode=3 , for fixed shipping amount )",
                                    "type": "string",
                                    "example": ""
                                  },
                                  "end_interval": {
                                    "name": "end_interval",
                                    "description": "End zone ( double type string for accuracy 2 )",
                                    "type": "string",
                                    "example": ""
                                  },
                                  "first_amount": {
                                    "name": "first_amount",
                                    "description": "Starting amount ( double type string for accuracy 2 ) eg. \" 1.08 \"",
                                    "type": "string",
                                    "example": ""
                                  },
                                  "first_measure": {
                                    "name": "first_measure",
                                    "description": "Starting amount ( double type string for accuracy 2 ) eg. \" 1.08 \"",
                                    "type": "string",
                                    "example": ""
                                  },
                                  "incr_amount": {
                                    "name": "incr_amount",
                                    "description": "Amount of continued ( double type string for precision 2 ) eg. \" 1.08 \"",
                                    "type": "string",
                                    "example": ""
                                  },
                                  "incr_measure": {
                                    "name": "incr_measure",
                                    "description": "Continued ( double type string for precision 2 ) eg. \" 2.01 \"",
                                    "type": "string",
                                    "example": ""
                                  },
                                  "measure_unit": {
                                    "name": "measure_unit",
                                    "description": "Unit of measurement ( kg-kg , g-g , lb-lb , oz-oz , when chargeMode=1 , required ) eg. kg",
                                    "type": "string",
                                    "example": ""
                                  }
                                },
                                "example": {
                                  "incr_amount": "",
                                  "incr_measure": "",
                                  "measure_unit": "",
                                  "start_interval": "",
                                  "custom_amount": "",
                                  "end_interval": "",
                                  "first_amount": "",
                                  "first_measure": ""
                                }
                              },
                              "example": [
                                {
                                  "end_interval": "",
                                  "first_amount": "",
                                  "first_measure": "",
                                  "incr_amount": "",
                                  "incr_measure": "",
                                  "measure_unit": "",
                                  "start_interval": "",
                                  "custom_amount": ""
                                }
                              ]
                            },
                            "charge_mode": {
                              "name": "charge_mode",
                              "description": "Charge mode ( 1- by weight , 3- by-item fee , 4- fixed shipping ) must be within the right range [ 1 , 4 ]",
                              "type": "integer",
                              "example": 0
                            },
                            "delivery_name": {
                              "name": "delivery_name",
                              "description": "Shipping plan name , shipping name will be displayed to the user to see",
                              "type": "string",
                              "example": ""
                            },
                            "first_amount": {
                              "name": "first_amount",
                              "description": "Starting amount ( double type string for accuracy 2 ) eg. \" 1.08 \"",
                              "type": "string",
                              "example": ""
                            },
                            "conditional_interval": {
                              "name": "conditional_interval",
                              "description": "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",
                              "type": "integer",
                              "example": 0
                            },
                            "incr_amount": {
                              "name": "incr_amount",
                              "description": "Amount of continued ( double type string for precision 2 ) eg. \" 1.08 \"",
                              "type": "string",
                              "example": ""
                            },
                            "measure_unit": {
                              "name": "measure_unit",
                              "description": "Unit of measurement ( kg-kg , g-g , lb-lb , oz-oz , when chargeMode=1 , required ) eg. kg",
                              "type": "string",
                              "example": ""
                            },
                            "custom_amount": {
                              "name": "custom_amount",
                              "description": "Custom shipping amount ( double type string for accuracy 2 , when chargeMode=3 , for fixed shipping amount )",
                              "type": "string",
                              "example": ""
                            },
                            "first_measure": {
                              "name": "first_measure",
                              "description": "Starting volume ( double type string of precision 2 , when chargeMode=2 , must be whole number ) eg : \" 1.08 \"",
                              "type": "string",
                              "example": ""
                            },
                            "incr_measure": {
                              "name": "incr_measure",
                              "description": "Continued ( double type string for precision 2 ) eg. \" 2.01 \"",
                              "type": "string",
                              "example": ""
                            }
                          },
                          "required": [
                            "charge_mode",
                            "conditional_interval",
                            "delivery_name"
                          ],
                          "example": {
                            "incr_measure": "",
                            "conditional_interval": 0,
                            "custom_amount": "",
                            "first_amount": "",
                            "incr_amount": "",
                            "delivery_name": "",
                            "measure_unit": "",
                            "first_measure": "",
                            "intervals": [
                              {
                                "end_interval": "",
                                "first_amount": "",
                                "first_measure": "",
                                "incr_amount": "",
                                "incr_measure": "",
                                "measure_unit": "",
                                "start_interval": "",
                                "custom_amount": ""
                              }
                            ],
                            "charge_mode": 0
                          }
                        },
                        "example": [
                          {
                            "measure_unit": "",
                            "conditional_interval": 0,
                            "first_measure": "",
                            "incr_measure": "",
                            "first_amount": "",
                            "charge_mode": 0,
                            "incr_amount": "",
                            "delivery_name": "",
                            "custom_amount": "",
                            "intervals": [
                              {
                                "first_amount": "",
                                "first_measure": "",
                                "incr_amount": "",
                                "incr_measure": "",
                                "measure_unit": "",
                                "start_interval": "",
                                "custom_amount": "",
                                "end_interval": ""
                              }
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "areas",
                      "area_name",
                      "shipping_plans"
                    ],
                    "example": {
                      "area_name": "",
                      "areas": [
                        {
                          "country_code": "",
                          "area_codes": [
                            ""
                          ]
                        }
                      ],
                      "shipping_plans": [
                        {
                          "custom_amount": "",
                          "incr_amount": "",
                          "conditional_interval": 0,
                          "measure_unit": "",
                          "first_amount": "",
                          "delivery_name": "",
                          "intervals": [
                            {
                              "incr_amount": "",
                              "incr_measure": "",
                              "measure_unit": "",
                              "start_interval": "",
                              "custom_amount": "",
                              "end_interval": "",
                              "first_amount": "",
                              "first_measure": ""
                            }
                          ],
                          "incr_measure": "",
                          "first_measure": "",
                          "charge_mode": 0
                        }
                      ]
                    }
                  },
                  "example": [
                    {
                      "area_name": "",
                      "areas": [
                        {
                          "area_codes": [
                            ""
                          ],
                          "country_code": ""
                        }
                      ],
                      "shipping_plans": [
                        {
                          "intervals": [
                            {
                              "first_amount": "",
                              "first_measure": "",
                              "incr_amount": "",
                              "incr_measure": "",
                              "measure_unit": "",
                              "start_interval": "",
                              "custom_amount": "",
                              "end_interval": ""
                            }
                          ],
                          "charge_mode": 0,
                          "incr_amount": "",
                          "delivery_name": "",
                          "first_measure": "",
                          "conditional_interval": 0,
                          "incr_measure": "",
                          "measure_unit": "",
                          "custom_amount": "",
                          "first_amount": ""
                        }
                      ]
                    }
                  ]
                },
                "group_type": {
                  "name": "group_type",
                  "description": "Shipping configuration type ( 1 : general grouping , 2 : custom grouping , default 1 general grouping if not transmitted )",
                  "type": "integer",
                  "example": 1
                },
                "product_group_info": {
                  "name": "product_group_info",
                  "description": "Item group information",
                  "type": "object",
                  "properties": {
                    "product_group_name": {
                      "name": "product_group_name",
                      "description": "Product group name , groupType is required when 2 custom grouping ; groupType is default value when 1 general grouping : general grouping",
                      "type": "string",
                      "example": ""
                    },
                    "product_group_seq": {
                      "name": "product_group_seq",
                      "description": "Product grouped serial number , required during update , empty add",
                      "type": "string",
                      "example": ""
                    },
                    "product_ids": {
                      "name": "product_ids",
                      "description": "Product serial number list , groupType is required for 2 custom grouping ( Product spu serial number )",
                      "type": "array",
                      "items": {
                        "name": "product_ids",
                        "description": "Product serial number list , groupType is required for 2 custom grouping ( Product spu serial number )",
                        "type": "string",
                        "example": "[\"18053690657964710749100412\",\"18055123775710848634010412\"]"
                      },
                      "example": [
                        "[\"18053690657964710749100412\",\"18055123775710848634010412\"]"
                      ]
                    }
                  },
                  "example": {
                    "product_ids": [
                      "[\"18053690657964710749100412\",\"18055123775710848634010412\"]"
                    ],
                    "product_group_name": "",
                    "product_group_seq": ""
                  }
                }
              },
              "required": [
                "delivery_plans"
              ],
              "example": {
                "delivery_plans": [
                  {
                    "areas": [
                      {
                        "area_codes": [
                          ""
                        ],
                        "country_code": ""
                      }
                    ],
                    "shipping_plans": [
                      {
                        "intervals": [
                          {
                            "measure_unit": "",
                            "start_interval": "",
                            "custom_amount": "",
                            "end_interval": "",
                            "first_amount": "",
                            "first_measure": "",
                            "incr_amount": "",
                            "incr_measure": ""
                          }
                        ],
                        "charge_mode": 0,
                        "measure_unit": "",
                        "delivery_name": "",
                        "first_measure": "",
                        "custom_amount": "",
                        "conditional_interval": 0,
                        "first_amount": "",
                        "incr_amount": "",
                        "incr_measure": ""
                      }
                    ],
                    "area_name": ""
                  }
                ],
                "group_type": 1,
                "product_group_info": {
                  "product_ids": [
                    "[\"18053690657964710749100412\",\"18055123775710848634010412\"]"
                  ],
                  "product_group_name": "",
                  "product_group_seq": ""
                }
              }
            }
          },
          "example": {
            "shipping_zones": {
              "delivery_plans": [
                {
                  "area_name": "",
                  "areas": [
                    {
                      "area_codes": [
                        ""
                      ],
                      "country_code": ""
                    }
                  ],
                  "shipping_plans": [
                    {
                      "intervals": [
                        {
                          "custom_amount": "",
                          "end_interval": "",
                          "first_amount": "",
                          "first_measure": "",
                          "incr_amount": "",
                          "incr_measure": "",
                          "measure_unit": "",
                          "start_interval": ""
                        }
                      ],
                      "charge_mode": 0,
                      "custom_amount": "",
                      "measure_unit": "",
                      "delivery_name": "",
                      "incr_measure": "",
                      "first_amount": "",
                      "first_measure": "",
                      "conditional_interval": 0,
                      "incr_amount": ""
                    }
                  ]
                }
              ],
              "group_type": 1,
              "product_group_info": {
                "product_group_name": "",
                "product_group_seq": "",
                "product_ids": [
                  "[\"18053690657964710749100412\",\"18055123775710848634010412\"]"
                ]
              }
            }
          }
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "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."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "shipping_zone": {
                "name": "shipping_zone",
                "description": "Shipping plan settings return object",
                "type": "object",
                "properties": {
                  "is_success": {
                    "name": "is_success",
                    "description": "Success ( true or not : success , false : failure )",
                    "type": "boolean",
                    "example": false
                  },
                  "ext_map": {
                    "name": "ext_map",
                    "description": "Expand information",
                    "type": "map",
                    "example": {}
                  },
                  "group_seq": {
                    "name": "group_seq",
                    "description": "Grouping unique serial number",
                    "type": "string",
                    "example": ""
                  }
                },
                "example": {
                  "group_seq": "",
                  "is_success": false,
                  "ext_map": {}
                }
              }
            },
            "example": {
              "shipping_zone": {
                "ext_map": {},
                "group_seq": "",
                "is_success": false
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "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."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "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."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "post",
  "path": "/logistics/shipping_zones.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`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` ."
        }
      }
    }
  ],
  "info": {
    "title": "Batch shipping plan",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_shipping"
  ]
}
```