Preview Cancellation Charges
post
/bcws/webresources/v1.0/subscriptions/preview/cancellation/charges
Calculates the early termination charges for the account and contract passed in the request payload.
Request
There are no request parameters for this operation.
Supported Media Types
- application/xml
- application/json
Details about the account and contract.
Root Schema : schema
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
contractPreviewCancellationCharges: array
contractPreviewCancellationCharges
-
currency: integer
(int32)
The currency associated with the cancelation fee.
-
extension: object
extension
The extended attributes.
-
scopeLevel: integer
(int32)
The level of the cancelation. Can be one of the following:
- 1: Account level
- 2: Package level
- 3: Bundle level
-
totalCancellationFee(required): number
The total cancelation fee.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : ContractPreviewCancellationCharge
Type:
Show Source
object
-
cancellationChargeType: integer
(int32)
The type of cancelation fee. Can be one of the following:
- 0: Fixed
- 1: Reducing
-
cancellationFee(required): number
The cancellation fee.
-
subscriberContractRef: object
ResourceRef
Details about the account and contract.
Root Schema : schema
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
contractPreviewCancellationCharges: array
contractPreviewCancellationCharges
-
currency: integer
(int32)
The currency associated with the cancelation fee.
-
extension: object
extension
The extended attributes.
-
scopeLevel: integer
(int32)
The level of the cancelation. Can be one of the following:
- 1: Account level
- 2: Package level
- 3: Bundle level
-
totalCancellationFee(required): number
The total cancelation fee.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : ContractPreviewCancellationCharge
Type:
Show Source
object
-
cancellationChargeType: integer
(int32)
The type of cancelation fee. Can be one of the following:
- 0: Fixed
- 1: Reducing
-
cancellationFee(required): number
The cancellation fee.
-
subscriberContractRef: object
ResourceRef
Response
Supported Media Types
- application/xml
- application/json
200 Response
The cancellation charges were returned successfully.
Root Schema : schema
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
contractPreviewCancellationCharges: array
contractPreviewCancellationCharges
-
currency: integer
(int32)
The currency associated with the cancelation fee.
-
extension: object
extension
The extended attributes.
-
scopeLevel: integer
(int32)
The level of the cancelation. Can be one of the following:
- 1: Account level
- 2: Package level
- 3: Bundle level
-
totalCancellationFee(required): number
The total cancelation fee.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : ContractPreviewCancellationCharge
Type:
Show Source
object
-
cancellationChargeType: integer
(int32)
The type of cancelation fee. Can be one of the following:
- 0: Fixed
- 1: Reducing
-
cancellationFee(required): number
The cancellation fee.
-
subscriberContractRef: object
ResourceRef
500 Response
An internal server error occurred.
Examples
This example shows how to preview the early termination fees for a customer's contract by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X POST http://hostname:port/bcws/webresources/version/subscriptions/preview/cancellation/charges -H 'content-type: application/json' -d @file.json
where:
- hostname is the URL for the Billing Care REST server.
- port is the port for the Billing Care REST server.
- version is the version of the API you're using, such as v1.0.
- file.json is the JSON file that specifies members to add.
Example of Request Body
This shows an example of the contents of the file.json file sent as the request body.
{
"accountRef": {
"id": "0.0.0.1+-account+1607269"
},
"scopeLevel": 2,
"contractPreviewCancellationCharges": [
{
"subscriberContractRef": {
"id": "0.0.0.1+-subscriber_contract+1607909"
}
}
]
}
Example of Response Body
This example shows the contents of the response body in JSON format.
{
"extension": null,
"accountRef": {
"id": "0.0.0.1+-account+1607269",
"uri": null
},
"scopeLevel": 0,
"currency": 840,
"totalCancellationFee": 1800,
"contractPreviewCancellationCharges": [
{
"subscriberContractRef": {
"id": "0.0.0.1+-subscriber_contract+1607909",
"uri": null
},
"cancellationFee": 500,
"cancellationChargeType": 1
}
]
}