Calculate credit amount

post

/crmRestApi/resources/11.13.18.05/subscriptions/{SubscriptionNumber}/action/calculateCreditAmount

This method lets you calculate credit amount for a given subscription product PUID or a given external asset key. If both are specified, the subscription product PUID is given precedence.

Request

Path Parameters
Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
Request Body - application/vnd.oracle.adf.action+json ()
Root Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Body ()
Root Schema : schema
Type: object
Show Source
Back to Top

Examples

The following example shows how to calculate a credit amount by submitting a post request on the REST resource using cURL.

cURL Command

curl -u <username:password> \ -X https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/subscriptions/CDRM_15008/action/calculateCreditAmount

Example of Request Body using SubscriptionProductPuid

The following shows the contents of the request body in JSON format.

{
 

 "subscriptionProductPuid": "CDRM_15008-PRDT-15018",
 "closedDate": "2020-10-02",
 "closeCreditMethod":"ORA_FULL"
 
}

Example of Response Body

The following shows an example of the response body in JSON format.

 {
 "result": "1500"
}

Example of Request Body using ExternalAssetKey

The following shows the contents of the request body in JSON format.

{
 "name":"calculateCreditAmount",
 "parameters":[
 {"subscriptionProductPuid": "CDRM_15008-PRDT-15018"},
 {"closedDate": "2020-10-02"},
 {"closeCreditMethod":"ORA_FULL"}
 ]
}

Example of Response Body

The following shows an example of the response body in JSON format.

{
 "result": "1500"
}

Note:

If you pass both Subscription Product PUID and External Asset Key, Product PUID will be considered.

Back to Top