Newer Version Available

This content describes an older version of this product. View Latest

Commerce Subscriptions Cancellation

Cancel an active Commerce subscription. This API is available only to registered shoppers.

This API cancels a Commerce subscription for a registered shopper using the account ID specified in the effectiveAccountId parameter. If no account ID is provided as a query parameter, the API defaults to the user’s context to cancel the specified subscription.

Resource
1/commerce/webstores/webstoreId/subscriptions/actions/initiate-cancellation
Resource examples
1https://yourInstance.salesforce.com/services/data/v63.0/commerce/webstores/​0ZExx000000005rGAA/subscriptions/actions/initiate-cancellation
Available version
63.0
HTTP methods
POST
Request parameters for POST
Parameter Name Type Description Required or Optional Available Version
effectiveAccountId String ID of the account for which the request is made. If not specified, it defaults to the account ID for the context user. Optional

This field is required if the buyer wants to cancel a subscription associated with a managed account other than their default account.

63.0
Request body for POST
Root XML tag
CommerceSubscriptionCancelInput
JSON example
1{
2  "subscriptions": {
3    "ids": [
4      "02ixx0000004Hb4AAE"
5    ]
6  }
7}
Properties
Name Type Description Required or Optional Available Version
subscriptions Subscription IDs List Input List of Commere subscriptions to cancel. Required 63.0
Response body for POST
Commerce Subscription Cancel Output