Update a Subscription

PATCH /v1/customers/{customerId}/subscriptions/{subscriptionId}

Updates the specified subscription. This process is asynchronous, therefore it will start executing after the request is submitted and may take some time.

Headers

  • X-Tenant string Required

    The domain used to access the portal.

  • Authorization string Required

    JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

    Default value is Bearer eyJ0eXAiO....

  • X-Correlation-Id string(UUID)

    This header is optional and by setting it you can correlate the audit logs made by this request.

Path parameters

  • customerId string(uuid) Required

    GUID Unique identifier for the customer. The subscription must belong to this customer, otherwise this request will fail.

  • subscriptionId string(uuid) Required

    GUID Unique identifier for the subscription.

application/json

Body

The subscription base info to update the existent subscription.

  • name string | null Required

    The name of the subscription. This may be up to 255 characters.

  • quantity integer(int32) Required

    The quantity.

  • nextBillingFrequency object Required

    The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

    Additional properties are NOT allowed.

  • true if [automatic renew enabled]; otherwise, false.

  • Additional properties are NOT allowed.

    Hide autoRenewSettings attributes Show autoRenewSettings attributes object
    • term object Required

      The term duration for this entity. Possible values: NoTerm, OneMonth, OneYear, ThreeYears or FiveYears

      Additional properties are NOT allowed.

    • billingFrequency object Required

      The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

      Additional properties are NOT allowed.

    • customTermEndDate string(date-time) | null

      The custom term end date

Responses

  • Accepted

  • Bad Request

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

  • Conflict

    Hide response attributes Show response attributes object
    • The viewmodel for checking subscription conflict.

      Additional properties are NOT allowed.

      Hide portalSubscription attributes Show portalSubscription attributes object
      • name string | null Required

        The name of the subscription. This may be up to 255 characters.

      • quantity integer(int32) Required

        The quantity.

      • nextBillingFrequency object Required

        The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

        Additional properties are NOT allowed.

        Hide nextBillingFrequency attribute Show nextBillingFrequency attribute object
        • name string | null

          The name of the enumeration.

      • true if [automatic renew enabled]; otherwise, false.

      • Additional properties are NOT allowed.

        Hide autoRenewSettings attributes Show autoRenewSettings attributes object
        • term object Required

          The term duration for this entity. Possible values: NoTerm, OneMonth, OneYear, ThreeYears or FiveYears

          Additional properties are NOT allowed.

          Hide term attribute Show term attribute object
          • name string | null

            The name of the enumeration.

        • billingFrequency object Required

          The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

          Additional properties are NOT allowed.

          Hide billingFrequency attribute Show billingFrequency attribute object
          • name string | null

            The name of the enumeration.

        • quantity integer(int32) | null Required

          The quantity

        • customTermEndDate string(date-time) | null

          The custom term end date

      • endDate string(date-time) Required

        End date of subscription.

      • status object Required

        Additional properties are NOT allowed.

        Hide status attribute Show status attribute object
        • name string | null

          The name of the enumeration.

    • The viewmodel for checking subscription conflict.

      Additional properties are NOT allowed.

      Hide providerSubscription attributes Show providerSubscription attributes object
      • name string | null Required

        The name of the subscription. This may be up to 255 characters.

      • quantity integer(int32) Required

        The quantity.

      • nextBillingFrequency object Required

        The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

        Additional properties are NOT allowed.

        Hide nextBillingFrequency attribute Show nextBillingFrequency attribute object
        • name string | null

          The name of the enumeration.

      • true if [automatic renew enabled]; otherwise, false.

      • Additional properties are NOT allowed.

        Hide autoRenewSettings attributes Show autoRenewSettings attributes object
        • term object Required

          The term duration for this entity. Possible values: NoTerm, OneMonth, OneYear, ThreeYears or FiveYears

          Additional properties are NOT allowed.

          Hide term attribute Show term attribute object
          • name string | null

            The name of the enumeration.

        • billingFrequency object Required

          The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

          Additional properties are NOT allowed.

          Hide billingFrequency attribute Show billingFrequency attribute object
          • name string | null

            The name of the enumeration.

        • quantity integer(int32) | null Required

          The quantity

        • customTermEndDate string(date-time) | null

          The custom term end date

      • endDate string(date-time) Required

        End date of subscription.

      • status object Required

        Additional properties are NOT allowed.

        Hide status attribute Show status attribute object
        • name string | null

          The name of the enumeration.

    Hide response attributes Show response attributes object
    • The viewmodel for checking subscription conflict.

      Additional properties are NOT allowed.

      Hide portalSubscription attributes Show portalSubscription attributes object
      • name string | null Required

        The name of the subscription. This may be up to 255 characters.

      • quantity integer(int32) Required

        The quantity.

      • nextBillingFrequency object Required

        The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

        Additional properties are NOT allowed.

        Hide nextBillingFrequency attribute Show nextBillingFrequency attribute object
        • name string | null

          The name of the enumeration.

      • true if [automatic renew enabled]; otherwise, false.

      • Additional properties are NOT allowed.

        Hide autoRenewSettings attributes Show autoRenewSettings attributes object
        • term object Required

          The term duration for this entity. Possible values: NoTerm, OneMonth, OneYear, ThreeYears or FiveYears

          Additional properties are NOT allowed.

          Hide term attribute Show term attribute object
          • name string | null

            The name of the enumeration.

        • billingFrequency object Required

          The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

          Additional properties are NOT allowed.

          Hide billingFrequency attribute Show billingFrequency attribute object
          • name string | null

            The name of the enumeration.

        • quantity integer(int32) | null Required

          The quantity

        • customTermEndDate string(date-time) | null

          The custom term end date

      • endDate string(date-time) Required

        End date of subscription.

      • status object Required

        Additional properties are NOT allowed.

        Hide status attribute Show status attribute object
        • name string | null

          The name of the enumeration.

    • The viewmodel for checking subscription conflict.

      Additional properties are NOT allowed.

      Hide providerSubscription attributes Show providerSubscription attributes object
      • name string | null Required

        The name of the subscription. This may be up to 255 characters.

      • quantity integer(int32) Required

        The quantity.

      • nextBillingFrequency object Required

        The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

        Additional properties are NOT allowed.

        Hide nextBillingFrequency attribute Show nextBillingFrequency attribute object
        • name string | null

          The name of the enumeration.

      • true if [automatic renew enabled]; otherwise, false.

      • Additional properties are NOT allowed.

        Hide autoRenewSettings attributes Show autoRenewSettings attributes object
        • term object Required

          The term duration for this entity. Possible values: NoTerm, OneMonth, OneYear, ThreeYears or FiveYears

          Additional properties are NOT allowed.

          Hide term attribute Show term attribute object
          • name string | null

            The name of the enumeration.

        • billingFrequency object Required

          The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

          Additional properties are NOT allowed.

          Hide billingFrequency attribute Show billingFrequency attribute object
          • name string | null

            The name of the enumeration.

        • quantity integer(int32) | null Required

          The quantity

        • customTermEndDate string(date-time) | null

          The custom term end date

      • endDate string(date-time) Required

        End date of subscription.

      • status object Required

        Additional properties are NOT allowed.

        Hide status attribute Show status attribute object
        • name string | null

          The name of the enumeration.

    Hide response attributes Show response attributes object
    • The viewmodel for checking subscription conflict.

      Additional properties are NOT allowed.

      Hide portalSubscription attributes Show portalSubscription attributes object
      • name string | null Required

        The name of the subscription. This may be up to 255 characters.

      • quantity integer(int32) Required

        The quantity.

      • nextBillingFrequency object Required

        The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

        Additional properties are NOT allowed.

        Hide nextBillingFrequency attribute Show nextBillingFrequency attribute object
        • name string | null

          The name of the enumeration.

      • true if [automatic renew enabled]; otherwise, false.

      • Additional properties are NOT allowed.

        Hide autoRenewSettings attributes Show autoRenewSettings attributes object
        • term object Required

          The term duration for this entity. Possible values: NoTerm, OneMonth, OneYear, ThreeYears or FiveYears

          Additional properties are NOT allowed.

          Hide term attribute Show term attribute object
          • name string | null

            The name of the enumeration.

        • billingFrequency object Required

          The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

          Additional properties are NOT allowed.

          Hide billingFrequency attribute Show billingFrequency attribute object
          • name string | null

            The name of the enumeration.

        • quantity integer(int32) | null Required

          The quantity

        • customTermEndDate string(date-time) | null

          The custom term end date

      • endDate string(date-time) Required

        End date of subscription.

      • status object Required

        Additional properties are NOT allowed.

        Hide status attribute Show status attribute object
        • name string | null

          The name of the enumeration.

    • The viewmodel for checking subscription conflict.

      Additional properties are NOT allowed.

      Hide providerSubscription attributes Show providerSubscription attributes object
      • name string | null Required

        The name of the subscription. This may be up to 255 characters.

      • quantity integer(int32) Required

        The quantity.

      • nextBillingFrequency object Required

        The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

        Additional properties are NOT allowed.

        Hide nextBillingFrequency attribute Show nextBillingFrequency attribute object
        • name string | null

          The name of the enumeration.

      • true if [automatic renew enabled]; otherwise, false.

      • Additional properties are NOT allowed.

        Hide autoRenewSettings attributes Show autoRenewSettings attributes object
        • term object Required

          The term duration for this entity. Possible values: NoTerm, OneMonth, OneYear, ThreeYears or FiveYears

          Additional properties are NOT allowed.

          Hide term attribute Show term attribute object
          • name string | null

            The name of the enumeration.

        • billingFrequency object Required

          The billing frequency for this entity. Possible values: OneTime, Monthly, Annual, Triennial or None

          Additional properties are NOT allowed.

          Hide billingFrequency attribute Show billingFrequency attribute object
          • name string | null

            The name of the enumeration.

        • quantity integer(int32) | null Required

          The quantity

        • customTermEndDate string(date-time) | null

          The custom term end date

      • endDate string(date-time) Required

        End date of subscription.

      • status object Required

        Additional properties are NOT allowed.

        Hide status attribute Show status attribute object
        • name string | null

          The name of the enumeration.

  • Unauthorized

  • Forbidden

  • Not Found

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

  • Internal Server Error

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

PATCH /v1/customers/{customerId}/subscriptions/{subscriptionId}
curl \
 -X PATCH https://app-cloudcockpitapi-prod-01.azurewebsites.net/v1/customers/{customerId}/subscriptions/{subscriptionId} \
 -H "Content-Type: application/json" \
 -H "X-Tenant: portal.cloudcockpit.com" \
 -H "Authorization: Bearer eyJ0eXAiO..." \
 -H "X-Correlation-Id: string" \
 -d '{"name":"string","quantity":42,"nextBillingFrequency":{},"autoRenewEnabled":true,"autoRenewSettings":{"term":{},"billingFrequency":{},"customTermEndDate":"2024-05-04T09:42:00+00:00"}}'
Request examples
# Headers
X-Tenant: portal.cloudcockpit.com
Authorization: Bearer eyJ0eXAiO...
X-Correlation-Id: string

# Payload
{
  "name": "string",
  "quantity": 42,
  "nextBillingFrequency": {},
  "autoRenewEnabled": true,
  "autoRenewSettings": {
    "term": {},
    "billingFrequency": {},
    "customTermEndDate": "2024-05-04T09:42:00+00:00"
  }
}
Response examples (400)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}
Response examples (400)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}
Response examples (409)
{
  "portalSubscription": {
    "name": "string",
    "quantity": 42,
    "nextBillingFrequency": {
      "name": "string"
    },
    "autoRenewEnabled": true,
    "autoRenewSettings": {
      "term": {
        "name": "string"
      },
      "billingFrequency": {
        "name": "string"
      },
      "quantity": 42,
      "customTermEndDate": "2024-05-04T09:42:00+00:00"
    },
    "endDate": "2024-05-04T09:42:00+00:00",
    "status": {
      "name": "string"
    }
  },
  "providerSubscription": {
    "name": "string",
    "quantity": 42,
    "nextBillingFrequency": {
      "name": "string"
    },
    "autoRenewEnabled": true,
    "autoRenewSettings": {
      "term": {
        "name": "string"
      },
      "billingFrequency": {
        "name": "string"
      },
      "quantity": 42,
      "customTermEndDate": "2024-05-04T09:42:00+00:00"
    },
    "endDate": "2024-05-04T09:42:00+00:00",
    "status": {
      "name": "string"
    }
  }
}
Response examples (409)
{
  "portalSubscription": {
    "name": "string",
    "quantity": 42,
    "nextBillingFrequency": {
      "name": "string"
    },
    "autoRenewEnabled": true,
    "autoRenewSettings": {
      "term": {
        "name": "string"
      },
      "billingFrequency": {
        "name": "string"
      },
      "quantity": 42,
      "customTermEndDate": "2024-05-04T09:42:00+00:00"
    },
    "endDate": "2024-05-04T09:42:00+00:00",
    "status": {
      "name": "string"
    }
  },
  "providerSubscription": {
    "name": "string",
    "quantity": 42,
    "nextBillingFrequency": {
      "name": "string"
    },
    "autoRenewEnabled": true,
    "autoRenewSettings": {
      "term": {
        "name": "string"
      },
      "billingFrequency": {
        "name": "string"
      },
      "quantity": 42,
      "customTermEndDate": "2024-05-04T09:42:00+00:00"
    },
    "endDate": "2024-05-04T09:42:00+00:00",
    "status": {
      "name": "string"
    }
  }
}
Response examples (404)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}
Response examples (404)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}
Response examples (500)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}
Response examples (500)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}