Add or remove subscriptions from a co-term group

This endpoint lets you add or remove subscriptions within a co-term group. You can perform these actions both before and after the group is executed.

Using add and remove

To use this endpoint, use the action parameter to specify whether you want to ADD or REMOVE subscriptions. Before execution, no extra steps are needed; just list the subscriptions. After execution, include the preview or prorate field in your request to accurately adjust the billing cycle.

This endpoint supports partial errors, meaning if some subscriptions fail (because they're not found in the group), the system will still process the valid ones. You’ll get error messages for any failed subscriptions, allowing you to address issues without affecting successful operations.

Use Case: Add a Subscription to a Co-Term Group

This request adds subscriptions to a co-term group. The request includes the display name for the group and the list of subscription IDs to be added:

{
    "displayName": "coterm_group_display_name", 
    "action": "ADD", 
    "subscriptions": [ 
        "0ipWy-JmTTmnfOk6iRvOmg", 
        "O424T8TNSwKkMG2mCwo1XA",
        "jOFqVINuSnaTRu3dsadspOih2Q"
    ]
}
{
    "action": "subscriptions.coterm.update",
    "coTermGroupId": "-3W146iCQmmxjmuECrwb5Q", // ID of the co-term group.
    "account": "ZixS9sm8SQiYEEEl588pDw", // Account ID associated with the co-term group.
    "result": "success", // Result of the operation.
    "coTermChangesResult": [
        {
            "subscription": "204VepRUT2iWjnTQfJeIPA", // Subscription ID.
            "status": "Co-Termed" // Status after the update.
        },
        {
            "subscription": "O424T8TNSwKkMG2mCwo1XA",
            "status": "Co-Termed"
        },
        {
            "subscription": "jOFqVINuSnaTRu3dsadspOih2Q",
            "error": {
                "code": "subscription",
                "message": "Subscription not found in the coTerm group" // Error message for failed operations. 
            }
        }
    ]
}

Use Case: Remove a Subscription from a Co-Term Group

This request removes subscriptions from a co-term group. The request includes the display name for the group and the list of subscription IDs to be removed.

{
    "displayName": "coterm_group_display_name", 
    "action": "REMOVE", 
    "subscriptions": [ 
        "0ipWy-JmTTmnfOk6iRvOmg", 
        "O424T8TNSwKkMG2mCwo1XA",
        "jOFqVINuSnaTRu3dsadspOih2Q"
    ]
}
{
    "action": "subscriptions.coterm.update",
    "coTermGroupId": "-3W146iCQmmxjmuECrwb5Q", // ID of the co-term group.
    "account": "ZixS9sm8SQiYEEEl588pDw", // Account ID associated with the co-term group.
    "result": "success", // Result of the operation.
    "coTermChangesResult": [
        {
            "subscription": "204VepRUT2iWjnTQfJeIPA", // Subscription ID.
            "status": "Opted Out of Co-Terming" // Status after the update.
        }
    ]
}

Partial Success Response

This response shows a partial success, where some subscriptions were processed successfully while others encountered errors:

{
    "action": "subscriptions.coterm.update",
    "coTermGroupId": "-3W146iCQmmxjmuECrwb5Q", // ID of the co-term group.
    "account": "ZixS9sm8SQiYEEEl588pDw", // Account ID associated with the co-term group.
    "result": "success", // Indicates overall success, despite individual errors.
    "coTermChangesResult": [
        {
            "subscription": "204VepRUT2iWjnsdsdTQfJeIPA",
            "error": {
                "code": "subscription",
                "message": "Subscription not found in the coTerm group" // Error message for a specific subscription.
            }
        }
    ]
}
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!