Skip to main content
A newer release of this product is available.

Modify a subscription

Contributors

PUT /accounts/{account_id}/core/v1/subscriptions/{subscription_id}

Replaces the entire stored resource with the supplied JSON request body while preserving key values that are not user-modifiable.

Side Effects

  • If the user cancels the subscription, the PUT endpoint must be called with "status": "inactive".

  • When the status is set to "inactive", the pending charges for this subscription are sent to Zuora and the Zuora subscription will be marked as "inactive" in some way.

Parameters

Name Type In Required Description

account_id

string

path

True

ID of the containing account resource

  • example: {{.Account}}

subscription_id

string

path

True

ID of the subscription collection to list

Request Body

Replaces the entire stored resource with the supplied JSON request body while preserving key values that are not user-modifiable.

Side Effects

  • If the user cancels the subscription, the PUT endpoint must be called with "status": "inactive".

  • When the status is set to "inactive", the pending charges for this subscription are sent to Zuora and the Zuora subscription will be marked as "inactive" in some way.

Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-subscription"

version

string

True

Version of the resource. Defined values are:

  • "1.0"

  • "1.1"

  • "1.2"

id

string

False

Globally unique identifier of the resource. Defined values are:

  • Conforms to the UUIDv4 Schema

customerProfileID

string

False

JSON string containing the customer profile ID from Authorize.net, which was invoked by the UI, is not set for the trial term. Returns an empty string during read operation, if not set. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

paymentFirstName

string

False

JSON string containing a user-specified long-form first name used for payment billing. Specified only when the subscription is being rebilled. Defined values are:

  • Minimum length: 1

  • Maximum length: 63

paymentLastName

string

False

JSON string containing a user-specified long-form last name used for payment billing. Specified only when the subscription is being rebilled. Defined values are:

  • Minimum length: 1

  • Maximum length: 63

paymentAddress

paymentAddress

False

JSON object containing a collection of JSON strings specifying a billing address. Specified only when the subscription is being rebilled. If this key exists, all six of the contained JSON strings will be present. If nothing was provided by the user, the string will be empty.

paymentProfileID

string

False

JSON string containing the payment profile ID from Authorize.net that was invoked by the UI, not set for trial term. Returns an empty string during read operation if not set. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

paymentExpiry

string

False

JSON string containing a timestamp indicating when the payment method expires. This is obtained from authorize.net](http://authorize.net) and is set by the UI. Defined values are:

  • Conforms to the ISO-8601 Date Time Schema This field is not returned for trial terms.

purchaseOrderNumber

string

False

JSON string containing the purchase order number for the payment method. Defined values are:

  • Minimum length: 1

  • Maximum length: 31

marketplace

string

False

JSON string indicating the marketplace for an account where payments will be recorded. Defined values:

  • "netapp"

  • "azure"

  • "aws"

  • "gcp"

licenseSN

string

False

JSON string containing the license serial number for the payment method. Defined values are:

  • Minimum length: 1

  • Maximum length: 31

terms

string

False

JSON string indicating the current tier of the account. Defined values are:

  • "trial"

  • "paid"

status

string

False

JSON string indicating the current status of the subscription. Defined values are:

  • "active"

  • "inactive"

appLimit

number

False

JSON number indicating the application limit for this subscription. Value of -1 indicates no limit.

namespaceLimit

number

False

JSON number indicating the namespace limit for this subscription. Value of -1 indicates no limit.

subscriptionPeriod

number

False

JSON number indicating the subscription period. Value of -1 indicates no limit. Unit: days

gracePeriod

number

False

JSON number indicating the grace period after the trial subscription has expired or a paid subscription is canceled. Unit: days

reminderBeforePeriod

number

False

JSON number indicating the number of days before the end of the trial subscription when the customer notifications will begin. The value is expressed in days with a value of -1 indicating it's not applicable.

onboardStatus

string

False

JSON string indicating the current status of customer onboarding. Valid values are "not started", "in progress", "success", "failed". Defined values are:

  • "not started"

  • "in progress"

  • "success"

  • "failed"

costPerAppUnit

number

False

JSON number indicating the cost per app unit. For a trial version, the value is 0. Unit: US dollars

costPerNamespaceUnit

number

False

JSON number indicating the cost per namespace unit. For a trial version, the value is 0. Unit: US dollars

metadata

type_astra_metadata_update

False

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Example request
{
  "type": "application/astra-subscription",
  "version": "1.2",
  "customerProfileID": "2157047189",
  "paymentProfileID": "E7CEB0A9F1BECA32A02493E1B31D5955",
  "paymentExpiry": "2022-05-01T00:00:00Z"
}

Response

Status: 204, Indicates if the subscription resource was updated.

Response

Status: 401, Unauthorized
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/3",
  "title": "Missing bearer token",
  "detail": "The request is missing the required bearer token.",
  "status": "401"
}

Response

Status: 400, Bad request
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

invalidFields

array[invalidFields]

False

List of invalid request body fields

Example response
{
  "type": "https://astra.netapp.io/problems/5",
  "title": "Invalid query parameters",
  "detail": "The supplied query parameters are invalid.",
  "status": "400"
}

Response

Status: 409, Conflict
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

invalidFields

array[invalidFields]

False

List of invalid request body fields

Example response
{
  "type": "https://astra.netapp.io/problems/10",
  "title": "JSON resource conflict",
  "detail": "The request body JSON contains a field that conflicts with an idempotent value.",
  "status": "409"
}

Response

Status: 403, Forbidden
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/11",
  "title": "Operation not permitted",
  "detail": "The requested operation isn't permitted.",
  "status": "403"
}

Error

Status: 404, Not found
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example error response
{
  "type": "https://astra.netapp.io/problems/1",
  "title": "Resource not found",
  "detail": "The resource specified in the request URI wasn't found.",
  "status": "404"
}

Definitions

See Definitions

paymentAddress

JSON object containing a collection of JSON strings specifying a billing address. Specified only when the subscription is being rebilled. If this key exists, all six of the contained JSON strings will be present. If nothing was provided by the user, the string will be empty.

Name Type Required Description

addressCountry

string

True

JSON string containing the country name or country code associated with the postal address, as specified in ISO 3166 Alpha-2. Defined values are:

  • Minimum length: 0

  • Maximum length: 2

addressLocality

string

True

JSON string containing the locality (for example, city) associated with the postal address. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

addressRegion

string

True

JSON string containing the region (for example, state) associated with the postal address. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

postalCode

string

True

JSON string containing the postal code associated with the postal address. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

streetAddress1

string

True

JSON string containing the street address associated with the postal address. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

streetAddress2

string

False

JSON string containing optional ancillary street address information, post office box, and more. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

type_astra_label

Name Type Required Description

name

string

True

value

string

True

type_astra_metadata_update

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Name Type Required Description

labels

array[type_astra_label]

False

creationTimestamp

string

False

modificationTimestamp

string

False

createdBy

string

False

modifiedBy

string

False

invalidParams

Name Type Required Description

name

string

True

Name of the invalid query parameter

reason

string

True

Reason why the query parameter is invalid

invalidFields

Name Type Required Description

name

string

True

Name of the invalid request body field

reason

string

True

Reason why the request body field is invalid