Update Offer Details for a Purchased Product or Discount

put

/bcws/webresources/v1.0/subscriptions/offerdetails/{id}

Updates the details of a purchased product or discount. For example, updates the purchase fee, cycle start date, or usage discount amount.

Request

Path Parameters
  • The ID for the purchased product or discount to modify, such as 0.0.0.1+-purchased_product+234567 or 0.0.0.1+-purchased_discount+345678.
Supported Media Types
Request Body - application/xml ()
Root Schema : schema
Type: object
Show Source
Nested Schema : customizedChargeOffers
Type: array
The list of customized charge offers in the bundle.
Show Source
Nested Schema : customizedDiscountOffers
Type: array
The list of customized discount offers.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : Notes
Type: object
Show Source
Nested Schema : CustomizedChargeOffers
Type: object
The list of customized charge offers in the bundle.
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : EndingType
Type: object
Show Source
Nested Schema : StartingType
Type: object
Show Source
  • The starting type mode for a product. Can be one of the following:
    • immediately: The start date is set to today. This mode can be used with the purchaseStart, cycleStart, and usageStart parameters.
    • absolute: The start date is a calendar date. This mode can be used with the purchaseStart, cycleStart, and usageStart parameters.
    • relativeToPurchase: The start date is relative to the purchase date, such as a specified number of billing cycles, months, days, hours, minutes, or seconds after activation. This mode can be used with the cycleStart and usageStart parameters.
    • firstUsage: The start day is the day of the first recorded usage.
  • The date and time the cycle starts.
  • RelativeSettings
Nested Schema : overriddenCharges
Type: array
The overridden charges.
Show Source
Nested Schema : RelativeSettings
Type: object
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
Nested Schema : CustomizedDiscountOffers
Type: object
The list of customized discount offers.
Show Source
Nested Schema : overriddenCharges
Type: array
The overridden charges.
Show Source
Nested Schema : comments
Type: array
The list of comments associated with the note.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : Comments
Type: object
The list of comments associated with the note.
Show Source
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : customizedChargeOffers
Type: array
The list of customized charge offers in the bundle.
Show Source
Nested Schema : customizedDiscountOffers
Type: array
The list of customized discount offers.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : Notes
Type: object
Show Source
Nested Schema : CustomizedChargeOffers
Type: object
The list of customized charge offers in the bundle.
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : EndingType
Type: object
Show Source
Nested Schema : StartingType
Type: object
Show Source
  • The starting type mode for a product. Can be one of the following:
    • immediately: The start date is set to today. This mode can be used with the purchaseStart, cycleStart, and usageStart parameters.
    • absolute: The start date is a calendar date. This mode can be used with the purchaseStart, cycleStart, and usageStart parameters.
    • relativeToPurchase: The start date is relative to the purchase date, such as a specified number of billing cycles, months, days, hours, minutes, or seconds after activation. This mode can be used with the cycleStart and usageStart parameters.
    • firstUsage: The start day is the day of the first recorded usage.
  • The date and time the cycle starts.
  • RelativeSettings
Nested Schema : overriddenCharges
Type: array
The overridden charges.
Show Source
Nested Schema : RelativeSettings
Type: object
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
Nested Schema : CustomizedDiscountOffers
Type: object
The list of customized discount offers.
Show Source
Nested Schema : overriddenCharges
Type: array
The overridden charges.
Show Source
Nested Schema : comments
Type: array
The list of comments associated with the note.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : Comments
Type: object
The list of comments associated with the note.
Show Source
Back to Top

Response

200 Response

The offer details were updated successfully.

500 Response

An internal server error occurred.
Back to Top

Examples

This example shows how to update the details of a purchased product or discount by submitting a PUT request on the REST resource using cURL. For more information about cURL, see "Use cURL".

cURL Command

curl -X PUT http://hostname:port/bcws/webresources/v1.0/subscriptions/offerdetails/0.0.0.1+-purchased_product+209130 -H 'content-type: application/json' -d @updateDetails.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.
  • updateDetails.json is the JSON file that specifies the details to update.

Example of Request Body

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

{
   "customizedChargeOffers": [
      {
         "purchaseEnd": {
            "mode": "never",
            "endDate": ""
         },
         "cycleEnd": {
            "mode": "never",
            "endDate": ""
         },
         "usageEnd": {
            "mode": "never",
            "endDate": ""
         },
         "cycleDiscountOverride": 0,
         "cycleDiscountPercentOverride": 0,
         "usagePercentOverride": 0,
         "purchaseFeeOverride": 5,
         "cycleFeeOverride": 0,
         "purchaseDiscountOverride": 0,
         "purchaseDiscountPercentOverride": 0
      }
   ]
}

Example of Response Body

If successful, the response code 200 is returned with true in the response body.

Back to Top