Manage mid-term upgrades through APIs
The Adobe Commerce Partner API provides comprehensive support for mid-term upgrade operations. The following functionalities are available:
-
Subscription-level upgrade eligibility
Partners can retrieve eligible upgrade offers across all customer subscriptions. -
Targeted subscription upgrade offers
Partners can query upgrade eligibility for a specific subscription. -
Upgrade path discovery by market segment, country, and language
Partners can list all valid upgrade paths, filtered by market segment, country, and language. -
Switch order reversion
Partners can initiate reversal of switch orders to restore the original subscription state.
The following steps are involved in the upgrade process:
- Discover upgrade paths and preview switch order
- Create switch order
- Verify the upgrade
- Revert switch order
Discover upgrade path
You can use the following APIs to get the available switch plans and preview them before applying:
1. Retrieve upgrade paths
The GET Offer Switch Paths API enables Adobe partners to programmatically retrieve valid upgrade paths for customer subscriptions or offers, based on key business filters such as market segment, country, and language.
This API helps partners enable customers to upgrade their product subscriptions mid-term, rather than waiting until the subscription anniversary. This capability unlocks immediate access to higher-tier products and features, while allowing Adobe and its partners to capture revenue opportunities without delay.
<env root url>/v3/offer-switch-pathsRequest
Header:
Bearer <token>Query parameters:
customer-idsubscription-id and customer-id query parameters are provided: <br /> - Partners do not need to pass other fields. <br /> - By default, the country will be taken from the customer’s country, or from the deployment’s country if the subscription has deployment details unless explicitly overridden by the partner. <br /> - The customer segment will be same as customer market segment. <br /> - The language will default to MULT, unless explicitly overridden by the partner by passing the corresponding query parameter.Request body
None.
Request URL: /v3/offer-switch-paths?market-segment=COM&country=US&language=MULT
Response
{
"totalCount": 3,
"count": 3,
"offset": 0,
"limit": 20,
"productUpgrades": [
{
"sourceBaseOfferId": "30002139CC01A12",
"targetList": [
{
"targetBaseOfferId": "30002125CC01A12",
"sequence": 1,
"switchType": "PARTIAL_ALLOWED"
},
{
"targetBaseOfferId": "30013365CC01A12",
"sequence": 2,
"switchType": "PARTIAL_ALLOWED"
},
{
"targetBaseOfferId": "30002230CC01A12",
"sequence": 3,
"switchType": "PARTIAL_ALLOWED"
}
]
},
{
"sourceBaseOfferId": "30002994CC01A12",
"targetList": [
{
"targetBaseOfferId": "30005695CC01A12",
"sequence": 1,
"switchType": "PARTIAL_ALLOWED"
},
{
"targetBaseOfferId": "30002245CC01A12",
"sequence": 2,
"switchType": "PARTIAL_ALLOWED"
},
{
"targetBaseOfferId": "30002230CC01A12",
"sequence": 3,
"switchType": "PARTIAL_ALLOWED"
}
]
},
{
"sourceBaseOfferId": "30002125CC01A12",
"targetList": [
{
"targetBaseOfferId": "30002168CC01A12",
"sequence": 3,
"switchType": "PARTIAL_ALLOWED"
}
]
}
]
}
Response parameters:
2. Preview Switch Order
The newly introduced Preview Switch option in the OrderType parameter of the Create Order API helps partners to generate upgrade quotes prior to placing a switch order.
<env root url>/v3/customers/{{customerId}}/ordersRequest
Query parameters
Sample Request URL: POST https://partners-stage.adobe.io/v3/customers/1005944528/orders?fetch-price=true
Request body
{
"orderType" : "PREVIEW_SWITCH",
"currencyCode" : "USD",
"lineItems" : [
{
"extLineItemNumber" : 1,
"offerId" : "65322651CA02A12",
"quantity" : 15
}
],
"cancellingItems":[
{
"extLineItemNumber": 1,
"referenceLineItemNumber": 1,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"quantity" : 15
}
]
}
Request parameters:
Response
{
"referenceOrderId": "",
"externalReferenceId": "a96ee8fe-c440-4d1c-ae5b-a90e1825aef",
"orderId": "",
"customerId": "1005944528",
"currencyCode": "USD",
"orderType": "PREVIEW_SWITCH",
"status": "",
"pricingSummary": [
{
"totalLineItemPrice": 810.00,
"currencyCode": "USD"
}
],
"lineItems": [
{
"extLineItemNumber": 1,
"offerId": "65304479CA02A12",
"quantity": 15,
"subscriptionId": "",
"proratedDays": 90,
"pricing": {
"partnerPrice": 365.00,
"discountedPartnerPrice": 328.50,
"netPartnerPrice": 81.00,
"lineItemPartnerPrice": 810.00
}
}
],
"cancellingItems":[
{
"offerId": "65322651CA02A12",
"quantity": 15,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"pricing": {
"partnerPrice": 300.00,
"discountedPartnerPrice": 0.00,
"netPartnerPrice": -300.00,
"lineItemPartnerPrice": 300.00
},
"referenceLineItemNumber": 1,
}
]
"creationDate": "2025-03-17T11:42:29Z"
}
Response parameters:
The cancellingItems object lists the switch plan with corresponding pricing details. The following table lists the parameters in the cancellingItems object. For more details on the entire parameters of the Order source, refer to Order object.
Apply switch plan
Use the Create Order API with orderType as SWITCH to switch from the current order to a new one. Creating a switch order is functionally similar to a preview request, but it does not include pricing details in the response. Once placed, the order appears in the order history, and the same logic applies for tracking and managing orders.
This API facilitates upgrade orders with "From" and "To" product details.
Request
Query parameter
Sample request URL: POST https://partners-stage.adobe.io/v3/customers/1005944528/orders?reassign-users=true
Request body:
{
"orderType" : "SWITCH",
"currencyCode" : "USD",
"lineItems" : [
{
"extLineItemNumber" : 1,
"offerId" : "65322651CA02A12",
"quantity" : 15,
}
],
"cancellingItems":[
{
"extLineItemNumber": 1,
"referenceLineItemNumber": 1,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"quantity" : 15,
}
]
}
Response
{
"referenceOrderId": "",
"externalReferenceId": "a96ee8fe-c440-4d1c-ae5b-a90e1825aef",
"orderId": "123432123",
"customerId": "1005944528",
"currencyCode": "USD",
"orderType": "SWITCH",
"status": "",
"lineItems": [
{
"extLineItemNumber": 1,
"offerId": "65304479CA02A12",
"quantity": 15,
"subscriptionId": ""
}
],
"cancellingItems":[
{
"offerId": "65322651CA02A12",
"extLineItemNumber": 1,
"quantity": 15,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"referenceLineItemNumber": 1,
}
],
"creationDate": "2025-03-17T11:42:29Z"
}
Verify Switch Order
You can use the following APIs to verify the upgrade and rversal of the upgrade:
Get Order History
Request
Sample request URL: GET {{HOST}}/v3/customers/{{customerId}}/orders?offset=0&limit=25&order-type=SWITCH
Response
Sample response:
{
"totalCount": 0,
"count": 0,
"offset": 0,
"limit": 25,
"items": [
{
"referenceOrderId": "",
"externalReferenceId": "a96ee8fe-c440-4d1c-ae5b-a90e1825aef",
"orderId": "",
"customerId": "1005944528",
"currencyCode": "USD",
"orderType": "SWITCH",
"status": "1000",
"lineItems": [
{
"extLineItemNumber": 1,
"offerId": "65304479CA02A12",
"quantity": 15,
"subscriptionId": "asdfewaw1879af7204c7daee1NA"
}
],
"cancellingItems":[
{
"offerId": "65322651CA02A12",
"extLineItemNumber": 1,
"quantity": 15,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"referenceLineItemNumber": 1,
}
],
"creationDate": "2025-03-17T11:42:29Z"
}
],
"links": {
"self": {
"uri": "/v3/customers/1005944528/orders?order-type=SWITCH",
"method": "GET",
"headers": []
}
}
}
Get details of a specific order
Request
Sample request URL: GET {{HOST}}/v3/customers/{{customerId}}/orders/{{orderId}}
Response
Sample response:
{
"referenceOrderId": "",
"externalReferenceId": "a96ee8fe-c440-4d1c-ae5b-a90e1825aef",
"orderId": "",
"customerId": "1005944528",
"currencyCode": "USD",
"orderType": "SWITCH",
"status": "1000",
"lineItems": [
{
"extLineItemNumber": 1,
"offerId": "65304479CA02A12",
"quantity": 15,
"subscriptionId": "drger4cb14561879af7204c7daee1NA"
}
],
"cancellingItems":[
{
"offerId": "65322651CA02A12",
"extLineItemNumber": 1,
"quantity": 15,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"referenceLineItemNumber": 1,
}
],
"creationDate": "2025-03-17T11:42:29Z"
}
Revert Switch Order
Partners can perform upgrade reversals within 14 days. It restores original product licenses and de-provisions upgraded ones. Revert logic selects original orders in a first-in, first-out (FIFO) manner.
Note: Refunds are calculated based on the current price, discount level, and quantity at the time of revert.
Reverting a switch order involves:
Preview Revert Switch
Use PREVIEW_REVERT_SWITCH as the orderType in the Create Order API to get the required details and to check the validity of the reversal.
Request
Query parameters
Sample request URL: POST https://partners-stage.adobe.io/v3/customers/1005944528/orders?fetch-price=true
Request body:
{
"orderType" : "PREVIEW_REVERT_SWITCH",
"currencyCode" : "USD",
"referenceOrderId": "987654334",
"lineItems" : [
{
"extLineItemNumber" : 1,
"offerId" : "65322651CA02A12",
"quantity" : 15
}
],
"cancellingItems":[
{
"extLineItemNumber": 1,
"referenceLineItemNumber": 1,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"quantity" : 15
}
]
}
Response
{
"referenceOrderId": "",
"externalReferenceId": "a96ee8fe-c440-4d1c-ae5b-a90e1825aef",
"orderId": "",
"customerId": "1005944528",
"currencyCode": "USD",
"orderType": "PREVIEW_REVERT_SWITCH",
"referenceOrderId": "987654334",
"status": "",
"pricingSummary": [
{
"totalLineItemPrice": 810.00,
"currencyCode": "USD"
}
],
"lineItems": [
{
"extLineItemNumber": 1,
"offerId": "65304479CA02A12",
"quantity": 15,
"subscriptionId": "werb5a4ctrew879af7204c7daee1NA",
"proratedDays": 90,
"pricing": {
"partnerPrice": 365.00,
"discountedPartnerPrice": 328.50,
"netPartnerPrice": 81.00,
"lineItemPartnerPrice": 810.00
}
}
],
"cancellingItems":[
{
"offerId": "65322651CA02A12",
"quantity": 15,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"pricing": {
"partnerPrice": -300.00,
"discountedPartnerPrice": 0.00,
"netPartnerPrice": -300.00,
"lineItemPartnerPrice": -300.00
},
"referenceLineItemNumber": 1,
}
]
"creationDate": "2025-03-17T11:42:29Z"
}
Revert Switch Order
Use REVERT_SWITCH as the orderType in the Create Order API to revert to the plan from which you upgraded.
Note: You can use the reassign-user=true parameter in the request URL to automatically reassign users from the upgraded Teams subscription to the original Teams subscription.
Request
{
"orderType" : "REVERT_SWITCH",
"currencyCode" : "USD",
"referenceOrderId": "987654334",
"lineItems" : [
{
"extLineItemNumber" : 1,
"offerId" : "65322651CA02A12",
"quantity" : 15
}
],
"cancellingItems":[
{
"extLineItemNumber": 1,
"referenceLineItemNumber": 1,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"quantity" : 15,
}
]
}
Response
{
"referenceOrderId": "",
"externalReferenceId": "a96ee8fe-c440-4d1c-ae5b-a90e1825aef",
"orderId": "",
"customerId": "1005944528",
"currencyCode": "USD",
"orderType": "REVERT_SWITCH",
"referenceOrderId": "987654334",
"status": "",
"pricingSummary": [
{
"totalLineItemPrice": 810.00,
"currencyCode": "USD"
}
],
"lineItems": [
{
"extLineItemNumber": 1,
"offerId": "65304479CA02A12",
"quantity": 15,
"subscriptionId": "werb5a4ctrew879af7204c7daee1NA",
"proratedDays": 90,
"pricing": {
"partnerPrice": 365.00,
"discountedPartnerPrice": 328.50,
"netPartnerPrice": 81.00,
"lineItemPartnerPrice": 810.00
}
}
],
"cancellingItems":[
{
"offerId": "65322651CA02A12",
"quantity": 15,
"subscriptionId": "abfb5a4cb14561879af7204c7daee1NA",
"pricing": {
"partnerPrice": -300.00,
"discountedPartnerPrice": 0.00,
"netPartnerPrice": -300.00,
"lineItemPartnerPrice": -300.00
},
"referenceLineItemNumber": 1,
}
]
"creationDate": "2025-03-17T11:42:29Z"
}