**Version: 202601**

# Save general shopping schema

**POST** `/openapi/2026-01/shipping-schemas/general`

Create or Modify a general shipping schema.

## Request

**application/json**

**Body | Example**

**Body (required)**

- `shipping_schemas` object

  Shipping schemas

  - `id` string

    Shipping schema ID; updates the record if it exists, creates a new one otherwise
  - `name` string (required)

    Name of the shipping schema
  - `shippings` object[]

    List of shipping zone configurations

    *   Array \[

    - `id` string

      Shipping zone ID; updates the record if it exists, creates a new one otherwise
    - `name` string (required)

      Name of the shipping zone
    - `support_cod` int32

      Whether cash on delivery is supported:

      *   `1`: supported
      *   `0`: not supported
    - `plans` object[]

      List of shipping rate plans for this zone

      *   Array \[

      - `id` string

        Shipping plan ID; updates the record if it exists, creates a new one otherwise
      - `name` string (required)

        Name of the shipping rate plan
      - `desc` string

        Description of the shipping rate plan
      - `rule_type` string

        Condition type for range rules:

        *   `price`: order total
        *   `quantity`: grouped quantity
        *   `weight`: grouped weight
        *   `pass`: no condition
      - `rule_range_min` string

        Minimum value of the condition range
      - `rule_range_max` string

        Maximum value of the condition range
      - `rule_range_infinite` int32

        Flag indicating the maximum value is unbounded (infinity)
      - `rule_range_unit` string

        Unit of the range value, e.g. weight unit "kg", quantity unit "piece", price unit as currency code
      - `rate_type` string

        Rate calculation method:

        *   `normal`: flat fee
        *   `weight`: first-weight + additional-weight
        *   `percent`: percentage-based
        *   `third`: third-party carrier
      - `rate_amount` string

        Rate value corresponding to the rate type:

        *   flat fee amount
        *   first-weight fee
        *   percentage value
        *   empty for third-party
      - `rate_first_range` string

        Weight threshold for the first-weight tier
      - `rate_first_unit` string

        Unit for the first-weight tier (e.g. "kg")
      - `rate_additional_amount` string

        Additional fee charged per additional weight unit beyond the first-weight tier
      - `rate_additional_unit` string

        Unit for the additional-weight tier (e.g. "kg")
      - `rate_additional_range` string

        Weight increment per additional-weight unit
      - `plan_type` int32

        Plan type:

        *   `1`: custom
        *   `2`: third-party carrier
      - `plan_type_value` string

        Configuration value associated with the plan type (e.g. third-party carrier identifier)
      - `rule_type_scope` int32

        Scope of the range rule:

        *   `1`: order level
        *   `2`: group level
        *   `3`: other
      *   \]
    - `areas` object[]

      List of geographic areas covered by this zone

      *   Array \[

      - `country_name` string (required)

        Display name of the country
      - `country_code` string (required)

        ISO country code
      - `province_codes` string[]

        List of province/state codes covered by this area
      *   \]
    *   \]

```json
{
  "shipping_schemas": {
    "id": "string",
    "name": "string",
    "shippings": [
      {
        "id": "string",
        "name": "string",
        "support_cod": 0,
        "plans": [
          {
            "id": "string",
            "name": "string",
            "desc": "string",
            "rule_type": "string",
            "rule_range_min": "string",
            "rule_range_max": "string",
            "rule_range_infinite": 0,
            "rule_range_unit": "string",
            "rate_type": "string",
            "rate_amount": "string",
            "rate_first_range": "string",
            "rate_first_unit": "string",
            "rate_additional_amount": "string",
            "rate_additional_unit": "string",
            "rate_additional_range": "string",
            "plan_type": 0,
            "plan_type_value": "string",
            "rule_type_scope": 0
          }
        ],
        "areas": [
          {
            "country_name": "string",
            "country_code": "string",
            "province_codes": [
              "string"
            ]
          }
        ]
      }
    ]
  }
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `shipping_schemas` object

    The saved general shipping schema

    - `id` string

      Shipping schema ID
    - `name` string

      Name of the shipping schema
    - `schema_type` int32

      Schema type:

      *   `0`: general
      *   `1`: custom
    - `variant_num` int32

      Number of product variants associated with this schema
    - `shippings` object[]

      List of shipping zones under this schema

      *   Array \[

      - `id` string

        Shipping ID
      - `name` string

        Name of the shipping zone
      - `schema_id` string

        ID of the shipping schema this zone belongs to
      - `support_cod` int32

        Whether cash on delivery is supported; 1 = supported, 0 = not supported
      - `plans` object[]

        List of shipping rate plans for this zone

        *   Array \[

        - `id` string

          Shipping rate plan ID
        - `shipping_id` string

          ID of the shipping zone this plan belongs to
        - `name` string

          Name of the shipping rate plan
        - `desc` string

          Description of the shipping rate plan
        - `support_cod` int32

          Whether cash on delivery is supported:

          *   `1`: supported
          *   `0`: not supported
        - `rule_type` string

          Condition type for range rules:

          *   `price`: order total
          *   `quantity`: grouped quantity
          *   `weight`: grouped weight
          *   `pass`: no condition
        - `rule_range_min` string

          Minimum value of the condition range
        - `rule_range_max` string

          Maximum value of the condition range
        - `rule_range_infinite` int32

          Flag indicating the maximum value is unbounded (infinity)
        - `rule_range_unit` string

          Unit of the range value, e.g. weight unit "kg", quantity unit "piece", price unit as currency code
        - `rate_type` string

          Rate calculation method:

          *   `normal`: flat fee
          *   `weight`: first-weight + additional-weight
          *   `percent`: percentage-based
          *   `third`: third-party carrier
        - `rate_amount` string

          Rate value corresponding to the rate type:

          *   flat fee amount
          *   first-weight fee
          *   percentage value
          *   empty for third-party
        - `rate_first_range` string

          Weight threshold for the first-weight tier
        - `rate_first_unit` string

          Unit for the first-weight tier (e.g. "kg")
        - `rate_additional_amount` string

          Additional fee charged per additional weight unit beyond the first-weight tier
        - `rate_additional_unit` string

          Unit for the additional-weight tier (e.g. "kg")
        - `rate_additional_range` string

          Weight increment per additional-weight unit
        - `store_id` string

          ID of the store this plan belongs to
        - `created_time` string

          Timestamp when the plan was created
        - `updated_time` string

          Timestamp when the plan was last updated
        - `plan_type` int32

          Plan type:

          *   `1`: custom
          *   `2`: third-party carrier
        - `plan_type_value` string

          Configuration value associated with the plan type (e.g. third-party carrier identifier)
        - `rule_type_scope` int32

          Scope of the range rule:

          *   `1`: order level
          *   `2`: group level
          *   `3`: other
        *   \]
      - `areas` object[]

        List of geographic areas covered by this zone

        *   Array \[

        - `shipping_id` string

          ID of the shipping zone this area belongs to
        - `country_name` string

          Display name of the country
        - `country_code` string

          ISO country code
        - `province_codes` string[]

          List of province/state codes covered by this area
        *   \]
      *   \]

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "shipping_schemas": {
      "id": "string",
      "name": "string",
      "schema_type": 0,
      "variant_num": 0,
      "shippings": [
        {
          "id": "string",
          "name": "string",
          "schema_id": "string",
          "support_cod": 0,
          "plans": [
            {
              "id": "string",
              "shipping_id": "string",
              "name": "string",
              "desc": "string",
              "support_cod": 0,
              "rule_type": "string",
              "rule_range_min": "string",
              "rule_range_max": "string",
              "rule_range_infinite": 0,
              "rule_range_unit": "string",
              "rate_type": "string",
              "rate_amount": "string",
              "rate_first_range": "string",
              "rate_first_unit": "string",
              "rate_additional_amount": "string",
              "rate_additional_unit": "string",
              "rate_additional_range": "string",
              "store_id": "string",
              "created_time": "string",
              "updated_time": "string",
              "plan_type": 0,
              "plan_type_value": "string",
              "rule_type_scope": 0
            }
          ],
          "areas": [
            {
              "shipping_id": "string",
              "country_name": "string",
              "country_code": "string",
              "province_codes": [
                "string"
              ]
            }
          ]
        }
      ]
    }
  }
}
```
