---
title: "Edit subscription contract information"

doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/order/subscription-order/edit-subscription-contract-information'
  md: 'https://developer.shopline.com/docs/admin-rest-api/order/subscription-order/edit-subscription-contract-information.md'
---
# Edit subscription contract information

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

## Request

### Path Parameters

* `id`

  string (required)

  Subscription contract number

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

* `subscription`

  object

  Subscription contract object

  * `receiver_info`

    object

    Consignee information

    * `district`

      string

      Consignee district county name

    * `province_code`

      string

      Consignee province-coded

    * `country`

      string

      Consignee country name

    * `company`

      string

      Consignee company name

    * `province`

      string

      Consignee province name

    * `phone`

      string

      Consignee mobile phone

    * `city`

      string

      Consignee city name

    * `receiver_unique_key`

      string

      Address line unique value

    * `country_code`

      string

      Consignee national encoding

    * `zip`

      string

      Consignee zip

    * `first_name`

      string

      Consignee name

    * `address2`

      string

      Consignee detailed address 2

    * `last_name`

      string

      Consignee last name

    * `city_code`

      string

      Consignee city coding

    * `address1`

      string

      Consignee detailed address

    * `district_code`

      string

      Consignee district county encoding

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

_No response body_

#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "externalDocs": {
    "description": "Permission point used by the interface is `write_subscription_contracts` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "HPs3mbmJ",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "description": "Subscription contract number",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "id",
        "description": "Subscription contract number",
        "type": "string",
        "example": ""
      },
      "example": ""
    },
    {
      "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": {
            "subscription": {
              "name": "subscription",
              "description": "Subscription contract object",
              "type": "object",
              "properties": {
                "receiver_info": {
                  "name": "receiver_info",
                  "description": "Consignee information",
                  "type": "object",
                  "properties": {
                    "district": {
                      "name": "district",
                      "description": "Consignee district county name",
                      "type": "string",
                      "example": ""
                    },
                    "province_code": {
                      "name": "province_code",
                      "description": "Consignee province-coded",
                      "type": "string",
                      "example": ""
                    },
                    "country": {
                      "name": "country",
                      "description": "Consignee country name",
                      "type": "string",
                      "example": ""
                    },
                    "company": {
                      "name": "company",
                      "description": "Consignee company name",
                      "type": "string",
                      "example": ""
                    },
                    "province": {
                      "name": "province",
                      "description": "Consignee province name",
                      "type": "string",
                      "example": ""
                    },
                    "phone": {
                      "name": "phone",
                      "description": "Consignee mobile phone",
                      "type": "string",
                      "example": ""
                    },
                    "city": {
                      "name": "city",
                      "description": "Consignee city name",
                      "type": "string",
                      "example": ""
                    },
                    "receiver_unique_key": {
                      "name": "receiver_unique_key",
                      "description": "Address line unique value",
                      "type": "string",
                      "example": ""
                    },
                    "country_code": {
                      "name": "country_code",
                      "description": "Consignee national encoding",
                      "type": "string",
                      "example": ""
                    },
                    "zip": {
                      "name": "zip",
                      "description": "Consignee zip",
                      "type": "string",
                      "example": ""
                    },
                    "first_name": {
                      "name": "first_name",
                      "description": "Consignee name",
                      "type": "string",
                      "example": ""
                    },
                    "address2": {
                      "name": "address2",
                      "description": "Consignee detailed address 2",
                      "type": "string",
                      "example": ""
                    },
                    "last_name": {
                      "name": "last_name",
                      "description": "Consignee last name",
                      "type": "string",
                      "example": ""
                    },
                    "city_code": {
                      "name": "city_code",
                      "description": "Consignee city coding",
                      "type": "string",
                      "example": ""
                    },
                    "address1": {
                      "name": "address1",
                      "description": "Consignee detailed address",
                      "type": "string",
                      "example": ""
                    },
                    "district_code": {
                      "name": "district_code",
                      "description": "Consignee district county encoding",
                      "type": "string",
                      "example": ""
                    }
                  },
                  "example": {
                    "address2": "",
                    "address1": "",
                    "phone": "",
                    "last_name": "",
                    "receiver_unique_key": "",
                    "country_code": "",
                    "first_name": "",
                    "zip": "",
                    "province_code": "",
                    "district_code": "",
                    "city": "",
                    "province": "",
                    "city_code": "",
                    "country": "",
                    "district": "",
                    "company": ""
                  }
                }
              },
              "example": {
                "receiver_info": {
                  "country_code": "",
                  "province": "",
                  "district_code": "",
                  "city_code": "",
                  "province_code": "",
                  "zip": "",
                  "address2": "",
                  "receiver_unique_key": "",
                  "first_name": "",
                  "country": "",
                  "city": "",
                  "company": "",
                  "phone": "",
                  "district": "",
                  "address1": "",
                  "last_name": ""
                }
              }
            }
          },
          "example": {
            "subscription": {
              "receiver_info": {
                "first_name": "",
                "district": "",
                "phone": "",
                "country": "",
                "district_code": "",
                "receiver_unique_key": "",
                "company": "",
                "country_code": "",
                "address1": "",
                "zip": "",
                "last_name": "",
                "city": "",
                "address2": "",
                "city_code": "",
                "province_code": "",
                "province": ""
              }
            }
          }
        }
      }
    },
    "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": {}
      }
    },
    "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": "/subscription/:id/edit_subscription.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": "Edit subscription contract information",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_subscription_contracts"
  ]
}
```