Lookup and Remove Deal pricing / Spot Prices from subscriptions
Our Cloud Management Platform allows you to set custom prices in the UX1 Marketplace, or by using the Subscription management screens in your reseller panel to adjust customer subscription prices.
In order to verify if you have Spot Prices active on a subscription, or if you need to remove these special prices at a later moment, you can use the API requests from this article.
In this article
Access to the REST APS API
Everyone with “Account Administrator“ privileges in the Commerce platform has the ability to generate an API Key/Secret to access the APS API of the platform. You can also manage your own permissions on this API. To do so, follow the following steps.
Logged on as a reseller user with Account Administrator permissions, switch to the “Classic“ control panel, and remain in the “Operations” panel.
Open the “Users” menu and look up your user account. Open the account settings by pressing on the username hyperlink.
Switch to the sub-menu “APS Bus Access”.
Generate your Key and Secret and store them in a secure place.
Most likely your OAuth Base URL is https://portal.cloudnet.services. In case it differs in your case, you can find it on this page. You will need this base URL in the next steps.
APS permissions
In order to execute the API requests in the rest of this guide, you will need to assign the following “Allowed Operations” as a minimum to your API Key. You can add these privileges by pressing the “Add“ button.
APS Type:[GET] http://www.odin.com/billing/Subscription
[DELETE] http://www.odin.com/billing/Subscription

Postman
You can use any API client of your choosing that supports OAuth authentication. In this guide, we will show instructions that have been tested using Postman.
In the Postman Authorization settings of your collection you need to choose the following settings:

Replace the {consumer_key} and {consumer_secret} variables with your API credentials generated before.
Using the API
Get the aps-id of a subscription
First, we need to know the SubscriptionID and convert this subscription-id to an aps-id. To do so you can utilize the following API request.
Replace the
{subscription-id}
variable with the subscription ID you see in the Commerce platform UI or on invoices.Replace the
{base_url}
variable with the base URL you found before.
[GET] {base_url}/aps/2/collections/bss-subscriptions?subscriptionId={subscription-id}
Example of a partial output of the API request:
"aps": {
"modified": "2023-03-01T09:39:50Z",
"id": "245f1068-2dc4-453e-af85-0e8276cf1ba9",
"type": "http://www.odin.com/billing/Subscription/1.0 ",
"status": "aps:ready",
"revision": 4
You will need to extract the “id“ value from the “aps“ section of this result. This value is further referred to as the {aps-id} of your subscription.
Get the special pricing promotion details of a subscription
Run the following API request to get the Special Pricing promotion details of the subscription.
Replace the
{aps-id}
variable with the aps id you retrieved in the request above.Replace the
{base_url}
variable with the base URL you found before.
[GET] {base_url}/aps/2/resources/{aps-id}/specialPricing
If you get an empty response format the API request with the message “204 No Content
", no promotions are currently active on your subscription.
In case there is a promotion active, you will receive details like in this example:
{
"applicableTo": [
"RENEWAL",
"SALES"
],
"creationDate": "2023-03-01",
"prices": {
"currencyId": "EUR",
"recurring": 0.0,
"transfer": 0.0,
"renewal": 0.0,
"setup": 0.0
},
"costs": {
"currencyId": "EUR",
"recurring": 0.0,
"transfer": 0.0,
"renewal": 0.0,
"setup": 0.0
},
"resources": [
{
"resourceId": "4d0762bf-875d-42ed-9558-724901127f28",
"prices": {
"currencyId": "EUR",
"recurring": 1.0,
"overuse": 0.0,
"setup": 0.0
},
"costs": {
"currencyId": "EUR",
"recurring": 0.02,
"overuse": 0.0,
"setup": 0.0
}
}
]
}
Remove the special pricing promotion from a subscription
In case you no longer want the special promotion prices to be active on your subscription, you can remove it with the following request.
Replace the
{aps-id}
variable with the aps id you retrieved in the request above.Replace the
{base_url}
variable with the base URL you found before.
[DELETE] {base_url}/aps/2/resources/{aps-id}/specialPricing
If the request was executed successfully the status code “204 No Content
" is returned.