Upgrade a Subscription

POST /v1/customers/{customerId}/subscriptions/{subscriptionId}/upgrade

Upgrades 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 transition info to upgrade the existent subscription.

Responses

POST /v1/customers/{customerId}/subscriptions/{subscriptionId}/upgrade
curl \
 -X POST https://app-cloudcockpitapi-prod-01.azurewebsites.net/v1/customers/{customerId}/subscriptions/{subscriptionId}/upgrade \
 -H "Content-Type: application/json" \
 -H "X-Tenant: portal.cloudcockpit.com" \
 -H "Authorization: Bearer eyJ0eXAiO..." \
 -H "X-Correlation-Id: string" \
 -d '{"destinationSubscriptionId":"string","destinationProviderSubscriptionId":"string","offerName":"string","offerId":"string","providerOfferId":"string","providerOfferIdWithAvailability":"string","imageUrl":"string","quantity":42,"termDuration":{},"billingFrequency":{},"transitionType":"string","transitionEvents":[{"name":"string","status":"string"}]}'
Request examples
# Headers
X-Tenant: portal.cloudcockpit.com
Authorization: Bearer eyJ0eXAiO...
X-Correlation-Id: string

# Payload
{
  "destinationSubscriptionId": "string",
  "destinationProviderSubscriptionId": "string",
  "offerName": "string",
  "offerId": "string",
  "providerOfferId": "string",
  "providerOfferIdWithAvailability": "string",
  "imageUrl": "string",
  "quantity": 42,
  "termDuration": {},
  "billingFrequency": {},
  "transitionType": "string",
  "transitionEvents": [
    {
      "name": "string",
      "status": "string"
    }
  ]
}
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"
      ]
    }
  ]
}