Create Ramp Deals using the REST API
Learn how to create ramp deals using the REST API by performing order operations and managing unique tokens for rate plans and charges.
- Determine the values of the following variables:
You will also need to provide two unique tokens for use in the API call. In the
CreateSubscriptionorder action you will assign the unique tokens to the rate plan and rate plan charge, respectively. This will enable you to identify the same rate plan and rate plan charge in theUpdateProductorder actions. In this tutorial, you will usenewsub_rp_Ybt80kas the unique token for the rate plan andnewsub_rpcharge_BE7FHeas the unique token for the rate plan charge.Variable
Description
$AccountNumThe number of the account that will own the order and the subscription. For example,
A00000001.$ProductRPIdThe ID of the product rate plan to subscribe to. For example,
2c92c0f85e5019d7015e513826e650f7.$ProductRPChargeIdThe ID of the product rate plan charge to use when subscribing to the product rate plan. For example,
2c92c0f85e5019d7015e5138b0395347.$TodayToday's date. For example,
2020-07-01.$Interval1_StartDateInterval 1 start date. For example,
2020-07-01.$Interval1_EndDateInterval 1 end date. For example,
2021-06-30.$Interval2_StartDateInterval 2 start date. For example,
2021-07-01.$Interval2_EndDateInterval 2 end date. For example,
2022-06-30.$Interval3_StartDateInterval 3 start date. For example,
2022-07-01.$Interval3_EndDateInterval 3 end date. For example,
2023-06-30. - Use the "Create an order" operation to create an order under an existing account:
To create the order under a new account instead of an existing account, specify the
newAccountfield instead of theexistingAccountNumberfield.Request
POST /v1/orders/Request Body
{ "orderDate": "$Today", "existingAccountNumber": "$AccountNum", "subscriptions": [ { "ramp": { "intervals": [ { "name": "Interval 1", "startDate": "$Interval1_StartDate", "endDate": "$Interval1_EndDate" }, { "name": "Interval 2", "startDate": "$Interval2_StartDate", "endDate": "$Interval2_EndDate" }, { "name": "Interval 3", "startDate": "$Interval3_StartDate", "endDate": "$Interval3_EndDate" } ] }, "orderActions": [ { "type": "CreateSubscription", "createSubscription": { "terms": { "initialTerm": { "startDate": "$Today", "period": 36, "periodType": "Month", "termType": "TERMED" }, "renewalTerms": [ { "period": 12, "periodType": "Month" } ], "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", "autoRenew": true }, "subscribeToRatePlans": [ { "productRatePlanId": "$ProductRPId", "uniqueToken": "newsub_rp_Ybt80k", "chargeOverrides": [ { "productRatePlanChargeId": "$ProductRPChargeId", "uniqueToken": "newsub_rpcharge_BE7FHe" } ] } ] }, "triggerDates": [ { "name": "ContractEffective", "triggerDate": "$Today" }, { "name": "ServiceActivation", "triggerDate": "$Today" }, { "name": "CustomerAcceptance", "triggerDate": "$Today" } ] }, { "type": "UpdateProduct", "updateProduct": { "uniqueToken": "newsub_rp_Ybt80k", "chargeUpdates": [ { "uniqueToken": "newsub_rpcharge_BE7FHe", "description": "test_description_regular", "pricing": { "recurringFlatFee": { "listPrice": 1200 } } } ] }, "triggerDates": [ { "name": "ContractEffective", "triggerDate": "$Interval2_StartDate" }, { "name": "ServiceActivation", "triggerDate": "$Interval2_StartDate" }, { "name": "CustomerAcceptance", "triggerDate": "$Interval2_StartDate" } ] }, { "type": "UpdateProduct", "updateProduct": { "uniqueToken": "newsub_rp_Ybt80k", "chargeUpdates": [ { "uniqueToken": "newsub_rpcharge_BE7FHe", "description": "test_description_regular", "pricing": { "recurringFlatFee": { "listPrice": 1400 } } } ] }, "triggerDates": [ { "name": "ContractEffective", "triggerDate": "$Interval3_StartDate" }, { "name": "ServiceActivation", "triggerDate": "$Interval3_StartDate" }, { "name": "CustomerAcceptance", "triggerDate": "$Interval3_StartDate" } ] } ] } ], "processingOptions": { "runBilling": false, "collectPayment": false } }
To preview invoices for the new subscription, use the Preview an order operation.