View Credit Promotions for an Account
get
/metering/api/v1/promotions/{accountId}
Retrieve details of all ongoing credit promotions for an account.
Request
Path Parameters
-
accountId: string
Account name starts with cacct.
Query Parameters
-
entitlementIds: string
Comma separated list of service entitlement Id.
-
promotionIds: string
Comma separated list of promotion id.
-
sourcepromotionIds: string
Comma separated list of sourcePromotionId.
-
subscriptionIds: string
Comma separated list of subscription id.
Response
Supported Media Types
- application/vnd.com.oracle.oraclecloud.metering.promotions+json
200 Response
Success
Nested Schema : Promotion
Type:
object
Title:
Show Source
Promotion
-
accountName(optional):
string
-
amount(optional):
number
-
balance(optional):
number
-
balanceModifiedOn(optional):
object balanceModifiedOn
-
balanceUnit(optional):
string
-
canonicalLink(optional):
string
-
createdOn(optional):
object createdOn
-
currencyUnit(optional):
string
-
description(optional):
string
-
duration(optional):
string
-
durationUnit(optional):
string
-
endDate(optional):
object endDate
-
entitlementIds(optional):
array entitlementIds
-
estimatedBalance(optional):
number
-
estimatedBalanceUpdatedOn(optional):
object estimatedBalanceUpdatedOn
-
id(optional):
number
-
modifiedOn(optional):
object modifiedOn
-
sourcePromotionId(optional):
number
-
startDate(optional):
object startDate
-
status(optional):
string
-
subscriptionIds(optional):
array subscriptionIds
Nested Schema : balanceModifiedOn
Type:
object
Nested Schema : createdOn
Type:
object
Nested Schema : endDate
Type:
object
Nested Schema : estimatedBalanceUpdatedOn
Type:
object
Nested Schema : modifiedOn
Type:
object
Nested Schema : startDate
Type:
object
Default Response
Unexpected error.
Examples
cURL Command
The following example shows how to retrieve information about all ongoing promotions for a given account by submitting a GET
request on the REST resource using cURL. For more information about cURL, see Use cURL.
Enter the command on a single line. Line breaks are used in this example for readability.
curl -X GET -u joe@example.com -H "X-ID-TENANT-NAME:myDomain" "https://itra.oraclecloud.com/metering/api/v1/promotions/a4357534"
Example of Request Body
There is no request body to submit with the HTTP request.
Example of Response Body
The following example shows the response body in JSON format.
{ "items": [ { "canonicalLink": "/metering/api/v1/promotions/a4357534", "id": 7828316295, "sourcePromotionId": 513347619, "amount": 260, "duration": "30", "currencyUnit": "EUR", "durationUnit": "DAY", "description": "order promotion", "balance": 260, "balanceModifiedOn": "2017-06-09T18:09:46.649Z", "startDate": "2017-06-09T18:11:33.087Z", "endDate": "2017-07-09T18:11:32.726Z", "createdOn": "2017-06-09T18:09:46.649Z", "modifiedOn": "2017-06-09T18:09:46.649Z", "estimatedBalance": 260, "estimatedBalanceUpdatedOn": "2017-06-09T18:09:46.649Z", "accountName": "a4357534", "status": "ACTIVE", "entitlementIds": [ "7827913035", "7827914849", "7827929453", "7827932267", "7827933680" ], "subscriptionIds": [ "1479994", "1479993", "1479981", "1479989", "1479995" ] } ] }