Update Dynamic Charges for a Purchased Product

patch

/bcws/webresources/v1.0/subscriptions/offer/{id}/overridecharges

Adds dynamic charges or updates existing dynamic chanrges for the purchased product with the specified ID.

Request

Path Parameters
  • The ID of the purchased product or discount to update dynamic charges for. For example: 0.0.0.1+-purchased_product+123123
Supported Media Types
Request Body - application/xml ()
Root Schema : schema
Type: array
Show Source
Nested Schema : overriddenCharges
Type: object
Show Source
Nested Schema : charges
Type: array
The charge details.
Show Source
Nested Schema : Charges
Type: object
The charge details.
Show Source
Nested Schema : charge
Type: array
The charges.
Show Source
Nested Schema : Charge
Type: object
The charges.
Show Source
Request Body - application/json ()
Root Schema : schema
Type: array
Show Source
Nested Schema : overriddenCharges
Type: object
Show Source
Nested Schema : charges
Type: array
The charge details.
Show Source
Nested Schema : Charges
Type: object
The charge details.
Show Source
Nested Schema : charge
Type: array
The charges.
Show Source
Nested Schema : Charge
Type: object
The charges.
Show Source
Back to Top

Response

204 Response

The dynamic charges were updated successfully.

400 Response

The request isn't valid.

500 Response

An internal server error occurred.
Back to Top

Examples

This example shows how update dynamic charges for a purchased product by submitting a PATCH request on the REST resource using cURL. For more information about cURL, see "Use cURL".

cURL Command

curl -X PATCH 'http://hostname:port/bcws/webresources/version/subscriptions/offer/0.0.0.1+-purchased_product+2832219/overridecharges' -H 'content-type: application/json' -d @updateCharges.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.
  • updateCharges.json is the JSON file that specifies the loan to create.

Example of Request Body

This example shows the contents of the updateCharges.json file sent as the request body.

[
         {
            "event":"/event/billing/product/fee/cycle/cycle_forward_arrear",
            "charges":[
               {
                  "startDate":"2021-10-19",
                  "endDate":"2021-11-19",
                  "charge":[
                     {
                        "amount":105,
                        "priceTag":"USD",
                        "type":"amount"
                     },
                     {
                        "amount":205,
                        "priceTag":"Free MInutes",
                        "type":"percentage"
                     }
                  ]
               },
               {
                  "startDate":"2021-11-20",
                  "endDate":"",
                  "charge":[
                     {
                        "amount":100,
                        "priceTag":"USD",
                        "type":"percentage"
                     },
                     {
                        "amount":200,
                        "priceTag":"Free MInutes",
                        "type":"percentage"
                     }
                  ]
               }
            ]
         },
          {
            "event":"/event/billing/product/fee/purchase",
            "charges":[
               {
                  "startDate":"2021-10-19",
                  "endDate":"2021-11-19",
                  "charge":[
                     {
                        "amount":105,
                        "priceTag":"USD",
                        "type":"amount"
                     }
                  ]
               },
               {
                  "startDate":"2021-11-20",
                  "endDate":"",
                  "charge":[
                     {
                        "amount":100,
                        "priceTag":"USD",
                        "type":"percentage"
                     }
                  ]
               }
            ]
         }  

Example of Response Body

If successful, the response code 204 is returned with no response body.

Back to Top