---
title: Change the subscription service.
slug: docs/demo/change-the-subscription-service
description: Learn how to use the cURL command to make a successful POST request to an API endpoint with this informative document. Discover how to include headers for accepting and sending JSON data, and explore a sample JSON payload containing essential parameters s
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "6lXCxzI4Ymiv8wdL60BKP",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/{subscriptionReference}/move",
    "name": "Change the subscription service.",
    "method": "POST",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string",
          "description": ""
        },
        {
          "kind": "required",
          "name": "subscriptionReference",
          "type": "string",
          "description": ""
        }
      ],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "request",
          "type": "object",
          "schema": [
            {
              "kind": "optional",
              "name": "servicePriceResourceReference",
              "type": "string",
              "example": "",
              "description": "ServicePriceResourceReference."
            },
            {
              "kind": "optional",
              "name": "immediateSwitch",
              "type": "boolean",
              "example": "",
              "description": "Flag that indicates if the switch is an immediate or scheduled one."
            },
            {
              "kind": "optional",
              "name": "settleBalance",
              "type": "string<ServiceCredits | Refund>",
              "example": "",
              "description": "Indicates if the refund should result into a Service credits refund or normal refund"
            },
            {
              "kind": "optional",
              "name": "taxInfo",
              "type": "object",
              "schema": [
                {
                  "kind": "optional",
                  "name": "category",
                  "type": "string",
                  "example": "",
                  "description": "Gets or sets the category"
                },
                {
                  "kind": "optional",
                  "name": "region",
                  "type": "object",
                  "schema": [
                    {
                      "kind": "optional",
                      "name": "zeroRated",
                      "type": "string",
                      "example": "",
                      "description": "Gets or sets the zero rated"
                    },
                    {
                      "kind": "optional",
                      "name": "country",
                      "type": "string",
                      "example": "",
                      "description": "Gets or sets the country"
                    },
                    {
                      "kind": "optional",
                      "name": "state",
                      "type": "string",
                      "example": "",
                      "description": "Gets or sets the state"
                    },
                    {
                      "kind": "optional",
                      "name": "county",
                      "type": "string",
                      "example": "",
                      "description": "Gets or sets the county"
                    },
                    {
                      "kind": "optional",
                      "name": "city",
                      "type": "string",
                      "example": "",
                      "description": "Gets or sets the city"
                    },
                    {
                      "kind": "optional",
                      "name": "zipCode",
                      "type": "string",
                      "example": "",
                      "description": "Gets or sets the zipcode"
                    },
                    {
                      "kind": "optional",
                      "name": "street",
                      "type": "string",
                      "example": "",
                      "description": "Gets or sets the street"
                    }
                  ],
                  "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.TaxRegionInfo",
                  "customType": "FictiveGlobal.Api.Rest.Dtos.v1.TaxRegionInfo",
                  "description": "Gets or sets the tax region info"
                }
              ],
              "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v2.TaxInfo",
              "customType": "FictiveGlobal.Api.Rest.Dtos.v2.TaxInfo",
              "description": "Tax information"
            }
          ],
          "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.SubscriptionMove.SubscriptionMoveRequest",
          "customType": "FictiveGlobal.Api.Rest.Dtos.v1.SubscriptionMove.SubscriptionMoveRequest",
          "isExpanded": true,
          "description": "Change the subscription service class."
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "amountCharged",
                "type": "number<double>",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "amountRefunded",
                "type": "number<double>",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "currency",
                "type": "string<ZZZ | GBP | EUR | USD | AUD | CAD | SEK | DKK | JPY | FictiveCREDITS | SAR | BGN | TWD | CZK | ILS | HUF | ISK | KRW | NOK | PLN | BRL | CHF | RON | RUB | HRK | ALL | THB | TRY | PKR | IDR | UAH | BYR | EEK | LVL | LTL | TJS | IRR | VND | AMD | AZN | MKD | ZAR | GEL | INR | MYR | KZT | KGS | KES | TMT | UZS | MNT | CNY | KHR | LAK | SYP | LKR | ETB | NPR | AFN | PHP | MVR | NIO | BOB | CLP | NZD | GTQ | RWF | XOF | IQD | MXN | CSD | BND | BDT | DZD | EGP | HKD | PEN | LYD | SGD | BAM | MOP | CRC | MAD | PAB | TND | DOP | OMR | JMD | VEB | YER | COP | RSD | BZD | JOD | TTD | ARS | LBP | ZWL | KWD | AED | UYU | BHD | PYG | QAR | HNL>",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "paymentType",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "subscriptionStatus",
                "type": "string<CancelledByCustomerSupport | Active | Expired | CancelledByAutoRenew | CancelledByUser | PackPricingItemCancelled | CancelledByPayPalIPN | FailureRetryMode | CancelledByBACS | Pending | CancelledBySEPA | OnHoliday | OnHold>",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "renewalDay",
                "type": "integer<int32>",
                "example": 0
              },
              {
                "kind": "optional",
                "name": "renewalDayOffset",
                "type": "integer<int32>",
                "example": 0
              },
              {
                "kind": "optional",
                "name": "startDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:11.0102626"
              },
              {
                "kind": "optional",
                "name": "renewalDate",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:11.0102626"
              },
              {
                "kind": "optional",
                "name": "orderReference",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "subscriptionId",
                "type": "integer<int32>",
                "example": 0
              },
              {
                "kind": "optional",
                "name": "subscriptionPriceId",
                "type": "integer<int32>",
                "example": 0
              },
              {
                "kind": "optional",
                "name": "subscriptionReference",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "removedOffers",
                "type": "array",
                "example": [],
                "itemType": "integer",
                "customType": "integer[]",
                "itemExample": ""
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.SubscriptionMove.SubscriptionMoveResponse",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.SubscriptionMove.SubscriptionMoveResponse",
            "isExpanded": true
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "403",
        "description": "The account has an existing subscription move.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Subscription cannot be found for the Account provided.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "405",
        "description": "Invalid Subscription Status.",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "examples": {
      "languages": [
        {
          "id": "330FSzNTIYSh1RvEv9F9F",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/{subscriptionReference}/move \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "nJcAbp0VWTjTKB5sS5STi",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/{subscriptionReference}/move\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "7Yxs7mo8_hpSoIBcGn5RI",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/{subscriptionReference}/move\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "tEfn_BxnxQae8HrXmxbjP",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/{subscriptionReference}/move\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "330FSzNTIYSh1RvEv9F9F"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK.\n{\n  \"amountCharged\": \"\",\n  \"amountRefunded\": \"\",\n  \"currency\": \"\",\n  \"paymentType\": \"\",\n  \"subscriptionStatus\": \"\",\n  \"renewalDay\": \"\",\n  \"renewalDayOffset\": \"\",\n  \"startDate\": \"2021-09-21T05:33:11.0102626\",\n  \"renewalDate\": \"2021-09-21T05:33:11.0102626\",\n  \"orderReference\": \"\",\n  \"subscriptionId\": \"\",\n  \"subscriptionPriceId\": \"\",\n  \"subscriptionReference\": \"\",\n  \"removedOffers\": [\n    0\n  ]\n}"
        },
        {
          "id": "response-1-403",
          "language": "403",
          "code": "// The account has an existing subscription move.\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// Subscription cannot be found for the Account provided.\n"
        },
        {
          "id": "response-3-405",
          "language": "405",
          "code": "// Invalid Subscription Status.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}