---
title: Update Subscription Attributes
slug: docs/demo/update-subscription-attributes
description: Learn how to use the curl command to make a PATCH request to an API endpoint with this code example. Discover how to include headers for accepting and sending JSON data, and explore the payload that contains vital information about the operation being exe
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "s5DHz9yfJTEFPJqCsJke8",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/{subscriptionReference}",
    "name": "Update Subscription Attributes",
    "method": "PATCH",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string"
        },
        {
          "kind": "required",
          "name": "subscriptionReference",
          "type": "string"
        }
      ],
      "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": "subscriptionPatchRequest",
          "type": "array",
          "schema": [
            {
              "kind": "optional",
              "name": "value",
              "type": "object",
              "schema": [],
              "modelRef": "#/definitions/System.Object",
              "customType": "System.Object"
            },
            {
              "kind": "optional",
              "name": "path",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "op",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "from",
              "type": "string",
              "example": ""
            }
          ],
          "modelRef": "#/definitions/Microsoft.AspNet.JsonPatch.JsonPatchDocument[FictiveGlobal.Api.Rest.Dtos.v2.Patch.Subscriptions.SubscriptionPatchModel]",
          "customType": "Microsoft.AspNet.JsonPatch.JsonPatchDocument[FictiveGlobal.Api.Rest.Dtos.v2.Patch.Subscriptions.SubscriptionPatchModel]",
          "isExpanded": true
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "subscriptions",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "accountSubscriptionInfo",
                    "type": "object",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "startDate",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:10.6352474",
                        "description": "Start Date"
                      },
                      {
                        "kind": "optional",
                        "name": "expiryDate",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:10.6352474",
                        "description": "Expiry Date"
                      },
                      {
                        "kind": "optional",
                        "name": "cancellationDate",
                        "type": "string<date-time>",
                        "example": "",
                        "description": "Cancellation Date"
                      },
                      {
                        "kind": "optional",
                        "name": "firstNonDiscountedBillingPointUtc",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:10.6352474",
                        "description": "First Non Discounted Billing PointUTC"
                      },
                      {
                        "kind": "optional",
                        "name": "lastDiscountedBillingPointUtc",
                        "type": "string<date-time>",
                        "example": "2021-09-21T05:33:10.6352474",
                        "description": "Last Discounted Billing PointUTC"
                      },
                      {
                        "kind": "optional",
                        "name": "paymentMethod",
                        "type": "string<CreditDebitCard | ServiceCredit | ReverseBillSms | NotAvailable | ActivationCode | DirectDebit | Paypal | PagosPSE | BankTransfer | Offline | Itunes | Przelewy24 | GlobalCollect | Alipay | Smartlink | Momo | Roku | SPCarrierBilling | Boku | Amazon | GooglePlay | Sofort | Telstra | Trustly | IDeal | SEPA>",
                        "example": "",
                        "description": "Payment Method"
                      },
                      {
                        "kind": "optional",
                        "name": "recurringPaymentInfo",
                        "type": "object",
                        "schema": [
                          {
                            "kind": "optional",
                            "name": "subscriptionReference",
                            "type": "integer<int32>",
                            "example": 0,
                            "description": "Subscription Reference"
                          },
                          {
                            "kind": "optional",
                            "name": "resourceReference",
                            "type": "string",
                            "example": "",
                            "description": "Unique Resource Reference"
                          },
                          {
                            "kind": "optional",
                            "name": "configuredSubscriptionPrice",
                            "type": "number<double>",
                            "example": "",
                            "description": "Configured Subscription Price"
                          },
                          {
                            "kind": "optional",
                            "name": "subscribedPrice",
                            "type": "number<double>",
                            "example": "",
                            "description": "Subscribed Price"
                          },
                          {
                            "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": "",
                            "description": "Currency"
                          },
                          {
                            "kind": "optional",
                            "name": "recurringPaymentEnable",
                            "type": "boolean",
                            "example": "",
                            "description": "Recurring Payment Enable"
                          },
                          {
                            "kind": "optional",
                            "name": "subscriptionLockedIn",
                            "type": "boolean",
                            "example": "",
                            "description": "Subscription LockedIn"
                          },
                          {
                            "kind": "optional",
                            "name": "nextPaymentDate",
                            "type": "string<date-time>",
                            "example": "2021-09-21T05:33:08.8070955",
                            "description": "Next Payment Date"
                          },
                          {
                            "kind": "optional",
                            "name": "previousBillingInfo",
                            "type": "object",
                            "schema": [
                              {
                                "kind": "optional",
                                "name": "subscriptionPriceId",
                                "type": "integer<int32>",
                                "example": 0,
                                "description": "Subscription Price Id"
                              },
                              {
                                "kind": "optional",
                                "name": "totalAmount",
                                "type": "number<double>",
                                "example": "",
                                "description": "Total Amount"
                              },
                              {
                                "kind": "optional",
                                "name": "totalTaxAmount",
                                "type": "number<double>",
                                "example": "",
                                "description": "Total Tax Amount"
                              },
                              {
                                "kind": "optional",
                                "name": "totalNetAmount",
                                "type": "number<double>",
                                "example": "",
                                "description": "Total Net Amount"
                              },
                              {
                                "kind": "optional",
                                "name": "billingDate",
                                "type": "string<date-time>",
                                "example": "2021-09-21T05:33:08.932098",
                                "description": "Billing Date"
                              },
                              {
                                "kind": "optional",
                                "name": "paymentDate",
                                "type": "string<date-time>",
                                "example": "2021-09-21T05:33:08.932098",
                                "description": "Payment Date"
                              },
                              {
                                "kind": "optional",
                                "name": "taxInfo",
                                "type": "array",
                                "schema": [
                                  {
                                    "kind": "optional",
                                    "name": "regionName",
                                    "type": "string",
                                    "example": "",
                                    "description": "Region Name"
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "regionType",
                                    "type": "string<ZeroRated | Country | State | County | City>",
                                    "example": "",
                                    "description": "Region Type"
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "displayName",
                                    "type": "string",
                                    "example": "",
                                    "description": "Display Name"
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "category",
                                    "type": "string",
                                    "example": "",
                                    "description": "Category"
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "rate",
                                    "type": "number<double>",
                                    "example": "",
                                    "description": "Rate"
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "amount",
                                    "type": "number<double>",
                                    "example": "",
                                    "description": "Amount"
                                  }
                                ],
                                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.AccountTaxInfo",
                                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.AccountTaxInfo[]",
                                "description": "Tax info"
                              },
                              {
                                "kind": "optional",
                                "name": "priceItems",
                                "type": "array",
                                "schema": [
                                  {
                                    "kind": "optional",
                                    "name": "thirdPartyRef",
                                    "type": "string",
                                    "example": "",
                                    "description": "Gets or sets the external reference."
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "supplierId",
                                    "type": "integer<int32>",
                                    "example": 0,
                                    "description": "Gets or sets the supplier id."
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "price",
                                    "type": "number<double>",
                                    "example": "",
                                    "description": "Gets or sets the price."
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "description",
                                    "type": "string",
                                    "example": "",
                                    "description": "Gets or sets the description."
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "isGrossAmount",
                                    "type": "boolean",
                                    "example": "",
                                    "description": "Specify whether is groos amount"
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "taxCategoryName",
                                    "type": "string",
                                    "example": "",
                                    "description": "Tax Category Name"
                                  }
                                ],
                                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.AccountPriceItem",
                                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.AccountPriceItem[]",
                                "description": "Price Items"
                              }
                            ],
                            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PreviousBillingInfo",
                            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PreviousBillingInfo",
                            "description": "Previous Billing Info"
                          },
                          {
                            "kind": "optional",
                            "name": "groupSubscriptionInfo",
                            "type": "object",
                            "schema": [
                              {
                                "kind": "optional",
                                "name": "licenseLevel",
                                "type": "integer<int32>",
                                "example": 0,
                                "description": "License Level"
                              },
                              {
                                "kind": "optional",
                                "name": "overflowLevel",
                                "type": "integer<int32>",
                                "example": 0,
                                "description": "Overflow Level"
                              },
                              {
                                "kind": "optional",
                                "name": "subscriberList",
                                "type": "array",
                                "schema": [
                                  {
                                    "kind": "optional",
                                    "name": "subscriptionId",
                                    "type": "integer<int32>",
                                    "example": 0,
                                    "description": "SubscriptionId"
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "emailAddress",
                                    "type": "string",
                                    "example": "",
                                    "description": "Email Address"
                                  },
                                  {
                                    "kind": "optional",
                                    "name": "clientUserId",
                                    "type": "string",
                                    "example": "",
                                    "description": "ClientUserId"
                                  }
                                ],
                                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Subscriber",
                                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Subscriber[]",
                                "description": "Subscriber List"
                              },
                              {
                                "kind": "optional",
                                "name": "overFlowCount",
                                "type": "integer<int32>",
                                "example": 0,
                                "description": "Overflow Count"
                              },
                              {
                                "kind": "optional",
                                "name": "fullSubscriptionsCount",
                                "type": "integer<int32>",
                                "example": 0,
                                "description": "Full Subscriptions Count"
                              },
                              {
                                "kind": "optional",
                                "name": "currentUserInOverFlow",
                                "type": "boolean",
                                "example": "",
                                "description": "Specify whether Current User In OverFlow"
                              },
                              {
                                "kind": "optional",
                                "name": "accountGroupToken",
                                "type": "string",
                                "example": "",
                                "description": "The subscriptions associated account group token."
                              }
                            ],
                            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.GroupSubscriptionInfo",
                            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.GroupSubscriptionInfo",
                            "description": "Group Subscription Info"
                          },
                          {
                            "kind": "optional",
                            "name": "voucherCodes",
                            "type": "object",
                            "schema": [
                              {
                                "kind": "optional",
                                "name": "voucherCode",
                                "type": "string",
                                "example": "",
                                "description": "Voucher Code"
                              },
                              {
                                "kind": "optional",
                                "name": "discountPrice",
                                "type": "number<double>",
                                "example": "",
                                "description": "Discount Price"
                              }
                            ],
                            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.AccountVoucherCode",
                            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.AccountVoucherCode",
                            "description": "Voucher Codes"
                          },
                          {
                            "kind": "optional",
                            "name": "statusInfo",
                            "type": "object",
                            "schema": [
                              {
                                "kind": "optional",
                                "name": "statusId",
                                "type": "integer<int32>",
                                "example": 0,
                                "description": "Status id"
                              },
                              {
                                "kind": "optional",
                                "name": "statusDescription",
                                "type": "string<CancelledByCustomerSupport | Active | Expired | CancelledByAutoRenew | CancelledByUser | PackPricingItemCancelled | CancelledByPayPalIPN | FailureRetryMode | CancelledByBACS | Pending | CancelledBySEPA | OnHoliday | OnHold>",
                                "example": "",
                                "description": "Status description"
                              }
                            ],
                            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.SubscriptionStatusInfo",
                            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.SubscriptionStatusInfo",
                            "description": "Subscription status info"
                          },
                          {
                            "kind": "optional",
                            "name": "customParameters",
                            "type": "object",
                            "schema": [],
                            "example": {},
                            "description": "Custom parameters"
                          }
                        ],
                        "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.RecurringPaymentInfo",
                        "customType": "FictiveGlobal.Api.Rest.Dtos.v1.RecurringPaymentInfo",
                        "description": "Recurring Payment Info"
                      },
                      {
                        "kind": "optional",
                        "name": "trialInfo",
                        "type": "object",
                        "schema": [
                          {
                            "kind": "optional",
                            "name": "paid",
                            "type": "boolean",
                            "example": "",
                            "description": "Paid"
                          },
                          {
                            "kind": "optional",
                            "name": "startDate",
                            "type": "string<date-time>",
                            "example": "2021-09-21T05:33:10.6821234",
                            "description": "StartDate"
                          },
                          {
                            "kind": "optional",
                            "name": "endDate",
                            "type": "string<date-time>",
                            "example": "2021-09-21T05:33:10.6821234",
                            "description": "EndDate"
                          },
                          {
                            "kind": "optional",
                            "name": "duration",
                            "type": "integer<int32>",
                            "example": 0,
                            "description": "Duration"
                          },
                          {
                            "kind": "optional",
                            "name": "durationUnit",
                            "type": "string",
                            "example": "",
                            "description": "DurationUnit"
                          }
                        ],
                        "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v2.AccountSubscriptionTrial",
                        "customType": "FictiveGlobal.Api.Rest.Dtos.v2.AccountSubscriptionTrial",
                        "description": "TrialInfo"
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v2.AccountSubscriptionInfo",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v2.AccountSubscriptionInfo",
                    "description": "Account subscription info"
                  },
                  {
                    "kind": "optional",
                    "name": "defaultSubscriptionInfo",
                    "type": "object",
                    "schema": [
                      {
                        "kind": "optional",
                        "name": "customParameters",
                        "type": "object",
                        "schema": [],
                        "example": {},
                        "description": "Custom Parameters"
                      },
                      {
                        "kind": "optional",
                        "name": "subscriptionId",
                        "type": "integer<int32>",
                        "example": 0,
                        "description": "Subscription Id"
                      },
                      {
                        "kind": "optional",
                        "name": "subscriptionStatus",
                        "type": "string",
                        "example": "",
                        "description": "Subscription Status"
                      },
                      {
                        "kind": "optional",
                        "name": "subscriptionTitle",
                        "type": "string",
                        "example": "",
                        "description": "Subscription Title"
                      },
                      {
                        "kind": "optional",
                        "name": "subscriptionGroup",
                        "type": "string",
                        "example": "",
                        "description": "Subscription Group"
                      },
                      {
                        "kind": "optional",
                        "name": "licenseLevel",
                        "type": "integer<int32>",
                        "example": 0,
                        "description": "The service license level"
                      }
                    ],
                    "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.DefaultSubscriptionInfo",
                    "customType": "FictiveGlobal.Api.Rest.Dtos.v1.DefaultSubscriptionInfo",
                    "description": "Default subscription info"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v2.AccountSubscription",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v2.AccountSubscription[]",
                "description": "Subscriptions"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v2.AccountSubscriptionResult",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v2.AccountSubscriptionResult",
            "isExpanded": true,
            "description": "Account Subscription result"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "{\n  \"accountSubscriptionInfo\": {\n    \"startDate\": \"2021-09-21T05:33:10.7915055\",\n    \"expiryDate\": \"2021-10-01T05:33:10.7915055\",\n    \"cancellationDate\": \"2021-10-01T05:33:10.7915055\",\n    \"firstNonDiscountedBillingPointUtc\": \"2021-08-21T05:33:10.7915055\",\n    \"lastDiscountedBillingPointUtc\": \"2021-07-21T05:33:10.7915055\",\n    \"paymentMethod\": \"CreditDebitCard\",\n    \"recurringPaymentInfo\": {\n      \"subscriptionReference\": 123455,\n      \"resourceReference\": \"ResourceReference\",\n      \"configuredSubscriptionPrice\": 10,\n      \"subscribedPrice\": 10.21,\n      \"currency\": \"GBP\",\n      \"recurringPaymentEnable\": false,\n      \"subscriptionLockedIn\": false,\n      \"nextPaymentDate\": \"2021-10-21T05:33:10.7915055\",\n      \"previousBillingInfo\": {\n        \"subscriptionPriceId\": 94852,\n        \"totalAmount\": 10,\n        \"totalTaxAmount\": 8.33,\n        \"totalNetAmount\": 1.667,\n        \"billingDate\": \"2021-09-20T05:33:10.7915055\",\n        \"paymentDate\": \"2021-09-20T05:33:10.7915055\",\n        \"taxInfo\": [\n          {\n            \"regionName\": \"GBR\",\n            \"regionType\": \"Country\",\n            \"displayName\": \"United Kingdom\",\n            \"category\": \"Standard\",\n            \"rate\": 20,\n            \"amount\": 1.667\n          }\n        ],\n        \"priceItems\": [\n          {\n            \"thirdPartyRef\": \"TOM10234\",\n            \"supplierId\": 123,\n            \"price\": 1,\n            \"description\": \"Price Item Description\",\n            \"isGrossAmount\": true,\n            \"taxCategoryName\": \"Standard Category\"\n          }\n        ]\n      },\n      \"groupSubscriptionInfo\": {\n        \"licenseLevel\": 1,\n        \"overflowLevel\": 0,\n        \"subscriberList\": [\n          {\n            \"subscriptionId\": 40000,\n            \"emailAddress\": \"testUser@test.test\",\n            \"clientUserId\": \"testUser\"\n          }\n        ],\n        \"overFlowCount\": 0,\n        \"fullSubscriptionsCount\": 1,\n        \"currentUserInOverFlow\": true,\n        \"accountGroupToken\": \"00000000-0000-0000-0000-000000000000\"\n      },\n      \"voucherCodes\": {\n        \"voucherCode\": \"ABDR5467YY\",\n        \"discountPrice\": 6\n      },\n      \"customParameters\": {\n        \"name1\": \"value1\"\n      }\n    },\n    \"trialInfo\": {\n      \"paid\": true,\n      \"startDate\": \"2021-09-21T05:33:10.7915055\",\n      \"endDate\": \"2021-09-22T05:33:10.7915055\",\n      \"duration\": 1,\n      \"durationUnit\": \"day\"\n    }\n  },\n  \"defaultSubscriptionInfo\": {\n    \"customParameters\": {\n      \"Origin\": \"Facebook\"\n    },\n    \"subscriptionId\": 40000,\n    \"subscriptionStatus\": \"Active\",\n    \"subscriptionTitle\": \"SubscriptionTitle\",\n    \"subscriptionGroup\": \"SubscriptionGroup\",\n    \"licenseLevel\": 0\n  }\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "Request is invalid.\r\n            <br /> Duplicate parameter {ParameterName} specified.\r\n            <br /> The specified parameters are invalid.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "403",
        "description": "Unable to authenticate using the provided session.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "No subscription found or provided address not found.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "412",
        "description": "Patch operation validation Error.\r\n            <br /> The property at path '/CustomSubscriptionParameter/{parameterValue}' could not be removed.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error.",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will allow you the ability to amend the following attributes of the subscription: status, custom attributes, shippingAddress and invoiceAddress",
    "examples": {
      "languages": [
        {
          "id": "0KEOk8zXBkiTedPouBVrS",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/{subscriptionReference} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-version: string' \\\n     --data '[\n     {}\n     ]'"
        },
        {
          "id": "oDjeycAezS3NIr5_Mq7KY",
          "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 raw = JSON.stringify([\n   {}\n]);\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/{subscriptionReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "vnW_VB5skeo6i0y3wLTG3",
          "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}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\nrequest.body = JSON.dump([\n   {}\n])\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "jLJEMLYkRCl-4T_v4E1qr",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/subscriptions/{subscriptionReference}\"\n\npayload = json.dumps([\n   {}\n])\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "0KEOk8zXBkiTedPouBVrS"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"accountSubscriptionInfo\": {\n    \"startDate\": \"2021-09-21T05:33:10.7915055\",\n    \"expiryDate\": \"2021-10-01T05:33:10.7915055\",\n    \"cancellationDate\": \"2021-10-01T05:33:10.7915055\",\n    \"firstNonDiscountedBillingPointUtc\": \"2021-08-21T05:33:10.7915055\",\n    \"lastDiscountedBillingPointUtc\": \"2021-07-21T05:33:10.7915055\",\n    \"paymentMethod\": \"CreditDebitCard\",\n    \"recurringPaymentInfo\": {\n      \"subscriptionReference\": 123455,\n      \"resourceReference\": \"ResourceReference\",\n      \"configuredSubscriptionPrice\": 10,\n      \"subscribedPrice\": 10.21,\n      \"currency\": \"GBP\",\n      \"recurringPaymentEnable\": false,\n      \"subscriptionLockedIn\": false,\n      \"nextPaymentDate\": \"2021-10-21T05:33:10.7915055\",\n      \"previousBillingInfo\": {\n        \"subscriptionPriceId\": 94852,\n        \"totalAmount\": 10,\n        \"totalTaxAmount\": 8.33,\n        \"totalNetAmount\": 1.667,\n        \"billingDate\": \"2021-09-20T05:33:10.7915055\",\n        \"paymentDate\": \"2021-09-20T05:33:10.7915055\",\n        \"taxInfo\": [\n          {\n            \"regionName\": \"GBR\",\n            \"regionType\": \"Country\",\n            \"displayName\": \"United Kingdom\",\n            \"category\": \"Standard\",\n            \"rate\": 20,\n            \"amount\": 1.667\n          }\n        ],\n        \"priceItems\": [\n          {\n            \"thirdPartyRef\": \"TOM10234\",\n            \"supplierId\": 123,\n            \"price\": 1,\n            \"description\": \"Price Item Description\",\n            \"isGrossAmount\": true,\n            \"taxCategoryName\": \"Standard Category\"\n          }\n        ]\n      },\n      \"groupSubscriptionInfo\": {\n        \"licenseLevel\": 1,\n        \"overflowLevel\": 0,\n        \"subscriberList\": [\n          {\n            \"subscriptionId\": 40000,\n            \"emailAddress\": \"testUser@test.test\",\n            \"clientUserId\": \"testUser\"\n          }\n        ],\n        \"overFlowCount\": 0,\n        \"fullSubscriptionsCount\": 1,\n        \"currentUserInOverFlow\": true,\n        \"accountGroupToken\": \"00000000-0000-0000-0000-000000000000\"\n      },\n      \"voucherCodes\": {\n        \"voucherCode\": \"ABDR5467YY\",\n        \"discountPrice\": 6\n      },\n      \"customParameters\": {\n        \"name1\": \"value1\"\n      }\n    },\n    \"trialInfo\": {\n      \"paid\": true,\n      \"startDate\": \"2021-09-21T05:33:10.7915055\",\n      \"endDate\": \"2021-09-22T05:33:10.7915055\",\n      \"duration\": 1,\n      \"durationUnit\": \"day\"\n    }\n  },\n  \"defaultSubscriptionInfo\": {\n    \"customParameters\": {\n      \"Origin\": \"Facebook\"\n    },\n    \"subscriptionId\": 40000,\n    \"subscriptionStatus\": \"Active\",\n    \"subscriptionTitle\": \"SubscriptionTitle\",\n    \"subscriptionGroup\": \"SubscriptionGroup\",\n    \"licenseLevel\": 0\n  }\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Request is invalid.\r\n             Duplicate parameter {ParameterName} specified.\r\n             The specified parameters are invalid.\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Unable to authenticate using the provided session.\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// No subscription found or provided address not found.\n"
        },
        {
          "id": "response-4-412",
          "language": "412",
          "code": "// Patch operation validation Error.\r\n             The property at path '/CustomSubscriptionParameter/{parameterValue}' could not be removed.\n"
        },
        {
          "id": "response-5-500",
          "language": "500",
          "code": "// Internal Server Error.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}