---
title: "Align Subscriptions"
method: POST
path: "/subscription/alignsubscriptions"
tags: ["Subscription API"]
---

# Align Subscriptions

`POST /subscription/alignsubscriptions`

Consolidates the billing of two subscriptions that belong to one customer. If <code>AlignToCurrentInterval</code> is set to <code>true</code>, the resource performs a pro-rated calculation of the cost of one subscription so that it can be merged with another subscription, and this results in a single billing event for a given period. You can also use the resource to calculate and preview the pro-rated cost of aligning two subscriptions. <br />For more information, see [Align Subscriptions](https://dev.cleverbridge.com/docs/align-subscription). For XML examples and schemas, see the [Additional Examples - Align Subscriptions](https://dev.cleverbridge.com/page/additional-examples-align-subscriptions).

## Headers

- `Accept` 'application/json' | 'application/xml'
- `Content-Type` 'application/json' | 'application/xml'

## Request body

- CleverbridgeBackEndRestApiSubscriptionClassesAlignSubscriptionsRequest
  - `AlignmentSettings` CleverbridgeBackEndRestApiSubscriptionClassesSubscriptionAlignmentSettings — Define the behavior when adding or updating a subscription item. For more information, see [Alignment Settings](https://dev.cleverbridge.com/docs/subscription-api-get-started#alignment-settings).
    - `AlignToCurrentInterval` boolean, required — Set to <code>true</code> if you want the customer to be charged immediately for the updated item (for example, a quantity increase). Otherwise, the customer will be charged at the next renewal.
    - `ExtendInterval` boolean — Set to <code>true</code> if you want to charge a full interval for the updated item (for example, a quantity increase). Otherwise, the customer will be charged a pro-rated amount for the updated item that corresponds to the time between the update and the next renewal. Important: <code>AlignToCurrentInterval</code> must be set to <code>true</code> if <code>ExtendInterval</code> is set to <code>true</code>.
    - `GetCustomerPricePreviewOnly` boolean, required — Set to <code>true</code> if you only want to obtain preview data in the response. You can use this data to display a price preview to a customer or for testing purposes.
  - `GenerateMail` boolean — Set to <code>true</code> if you want to send a confirmation email to the customer.
  - `PrimarySubscriptionId` string, required — Unique ID of the primary subscription, with or without an initial 'S'.
  - `SecondarySubscriptionId` string, required — Unique ID of the secondary subscription, with or without an initial 'S'.

## Response `200`

OK

- CleverbridgeBackEndRestApiSubscriptionClassesAlignSubscriptionsResponse
  - `AlignmentCustomerGrossPrice` number, double — Total gross price for alignment interval. Only for <code>CustomerPricePreview-Mode</code>.
  - `AlignmentCustomerNetPrice` number, double — Total net price for alignment interval. Only for <code>CustomerPricePreview-Mode</code>.
  - `AlignmentCustomerVatPrice` number, double — Total VAT amount for alignment interval. Only for <code>CustomerPricePreview-Mode</code>.
  - `NextBillingCustomerGrossPrice` number, double — Total gross price for next billing interval. Only for <code>CustomerPricePreview-Mode</code>.
  - `NextBillingCustomerNetPrice` number, double — Total net price next billing interval. Only for <code>CustomerPricePreview-Mode</code>.
  - `NextBillingCustomerVatPrice` number, double — Total VAT amount for next billing interval. Only for <code>CustomerPricePreview-Mode</code>.
  - `NextRenewalCustomerGrossPrice` number, double — Total gross price for next subscription interval. Only for <code>CustomerPricePreview-Mode</code>.
  - `NextRenewalCustomerNetPrice` number, double — Total net price next subscription interval. Only for <code>CustomerPricePreview-Mode</code>.
  - `NextRenewalCustomerVatPrice` number, double — Total VAT amount for next subscription interval. Only for <code>CustomerPricePreview-Mode</code>.
  - `PriceCurrencyId` string — Currency code in capital letters, see [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
  - `ResultMessage` string — Optional result or error message.

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/cleverbridge/apis/backend-rest-apis.md) · [All operations](https://skmtc.net/cleverbridge/apis/backend-rest-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cleverbridge/backend-rest-apis/versions/b7007b62f4c0/schema)
