---
title: "编辑订阅合同信息"
description: "编辑订单合同信息，当前仅支持订阅合同收件人信息"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/order/subscription-order/edit-subscription-contract-information'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/order/subscription-order/edit-subscription-contract-information.md'
---
# 编辑订阅合同信息

编辑订单合同信息，当前仅支持订阅合同收件人信息

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

## Endpoint

```http
POST /subscription/:id/edit_subscription.json
```

## Base URL

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

  * `{handle}`: `handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。

## Required Permissions

* `write_subscription_contracts`

## Request

### Path Parameters

* `id`

  string (required)

  订阅合同编号

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `Authorization`

  string (required)

  资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。

### Request Body

* `subscription`

  object

  订阅合同对象

  * `receiver_info`

    object

    收件人信息

    * `province`

      string

      收件人省份名称

    * `district_code`

      string

      收件人区县编码

    * `city`

      string

      收件人城市名称

    * `address2`

      string

      收件人详细地址2

    * `address1`

      string

      收件人详细地址

    * `city_code`

      string

      收件人城市编码

    * `receiver_unique_key`

      string

      地址信息行唯一值

    * `first_name`

      string

      收件人名

    * `country`

      string

      收件人国家名称

    * `country_code`

      string

      收件人国家编码

    * `last_name`

      string

      收件人姓

    * `district`

      string

      收件人区县名称

    * `phone`

      string

      收件人手机

    * `zip`

      string

      收件人邮编

    * `company`

      string

      收件人公司名称

    * `province_code`

      string

      收件人省份编码

## Response

### Status Codes

* `200`

  更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。

### Response Body

#### 200

_No response body_

#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "description": "编辑订单合同信息，当前仅支持订阅合同收件人信息",
  "externalDocs": {
    "description": "接口使用的权限点: `write_subscription_contracts` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "HPs3mbmJ",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "description": "订阅合同编号",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "id",
        "description": "订阅合同编号",
        "type": "string",
        "example": ""
      },
      "example": ""
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `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": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": "资源的访问令牌。请参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "subscription": {
              "name": "subscription",
              "description": "订阅合同对象",
              "type": "object",
              "properties": {
                "receiver_info": {
                  "name": "receiver_info",
                  "description": "收件人信息",
                  "type": "object",
                  "properties": {
                    "province": {
                      "name": "province",
                      "description": "收件人省份名称",
                      "type": "string",
                      "example": ""
                    },
                    "district_code": {
                      "name": "district_code",
                      "description": "收件人区县编码",
                      "type": "string",
                      "example": ""
                    },
                    "city": {
                      "name": "city",
                      "description": "收件人城市名称",
                      "type": "string",
                      "example": ""
                    },
                    "address2": {
                      "name": "address2",
                      "description": "收件人详细地址2",
                      "type": "string",
                      "example": ""
                    },
                    "address1": {
                      "name": "address1",
                      "description": "收件人详细地址",
                      "type": "string",
                      "example": ""
                    },
                    "city_code": {
                      "name": "city_code",
                      "description": "收件人城市编码",
                      "type": "string",
                      "example": ""
                    },
                    "receiver_unique_key": {
                      "name": "receiver_unique_key",
                      "description": "地址信息行唯一值",
                      "type": "string",
                      "example": ""
                    },
                    "first_name": {
                      "name": "first_name",
                      "description": "收件人名",
                      "type": "string",
                      "example": ""
                    },
                    "country": {
                      "name": "country",
                      "description": "收件人国家名称",
                      "type": "string",
                      "example": ""
                    },
                    "country_code": {
                      "name": "country_code",
                      "description": "收件人国家编码",
                      "type": "string",
                      "example": ""
                    },
                    "last_name": {
                      "name": "last_name",
                      "description": "收件人姓",
                      "type": "string",
                      "example": ""
                    },
                    "district": {
                      "name": "district",
                      "description": "收件人区县名称",
                      "type": "string",
                      "example": ""
                    },
                    "phone": {
                      "name": "phone",
                      "description": "收件人手机",
                      "type": "string",
                      "example": ""
                    },
                    "zip": {
                      "name": "zip",
                      "description": "收件人邮编",
                      "type": "string",
                      "example": ""
                    },
                    "company": {
                      "name": "company",
                      "description": "收件人公司名称",
                      "type": "string",
                      "example": ""
                    },
                    "province_code": {
                      "name": "province_code",
                      "description": "收件人省份编码",
                      "type": "string",
                      "example": ""
                    }
                  },
                  "example": {
                    "last_name": "",
                    "address1": "",
                    "city": "",
                    "phone": "",
                    "country_code": "",
                    "district_code": "",
                    "province_code": "",
                    "zip": "",
                    "city_code": "",
                    "country": "",
                    "receiver_unique_key": "",
                    "district": "",
                    "province": "",
                    "company": "",
                    "first_name": "",
                    "address2": ""
                  }
                }
              },
              "example": {
                "receiver_info": {
                  "district_code": "",
                  "phone": "",
                  "province": "",
                  "address1": "",
                  "country_code": "",
                  "city": "",
                  "company": "",
                  "country": "",
                  "address2": "",
                  "district": "",
                  "last_name": "",
                  "receiver_unique_key": "",
                  "city_code": "",
                  "first_name": "",
                  "province_code": "",
                  "zip": ""
                }
              }
            }
          },
          "example": {
            "subscription": {
              "receiver_info": {
                "last_name": "",
                "province_code": "",
                "receiver_unique_key": "",
                "zip": "",
                "address1": "",
                "city": "",
                "first_name": "",
                "province": "",
                "district_code": "",
                "country_code": "",
                "city_code": "",
                "district": "",
                "phone": "",
                "address2": "",
                "company": "",
                "country": ""
              }
            }
          }
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。",
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {}
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "post",
  "path": "/subscription/:id/edit_subscription.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "编辑订阅合同信息",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_subscription_contracts"
  ]
}
```