Update a Bucket Threshold for an Account
/adjustThreshold/{accountId}
Request
-
accountId(required): string
The ID or account number of the billing account to adjust the threshold for.Example:
0.0.0.1+-account+102879
- application/json;charset=utf-8
To adjust thresholds, you can specify either a product ID or bucket ID. If you specify both, the thresholds for the bucket will be adjusted. If you specify neither, the default balance group for the account will be used.
You must specify the resource type and provide values for all existing thresholds. Any new thresholds included in the request will be added. Any existing thresholds that are not included in the update request will be removed. For example, if there are three thresholds set for a bucket, but you only list two in the request, the third will be removed.
To remove all thresholds, include an empty thresholds array: [ ].
object
Adjust Threshold
-
@type: string
Title:
Type
The object's subclass. -
accountId(required): string
Title:
Account Id
The ID or account number of the billing account to adjust the threshold for. -
bucket: object
object
Bucket Ref
Title:
Bucket Ref
A reference to a bucket. -
product: object
object
Product Ref
Title:
Product Ref
A reference to a product. -
resourceType: string
Title:
Resource Type
The resource type of the balance element with the adjusted threshold. -
thresholds: array
array
thresholds
The new threshold amount.
object
Bucket Ref
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
href: string
(uri)
The bucket's href.
-
id(required): string
Title:
Bucket ID
The bucket's ID. -
name: string
Title:
Bucket Name
The bucket's name. -
usageType: string
The bucket's usage type.
object
Product Ref
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
href: string
Title:
Product Href
The product's href. -
id(required): string
Title:
Product ID
The product's ID. -
name: string
Title:
Product Name
The product's name.
array
-
Array of:
object Quantity
Title:
Quantity
The quantity of an object.
object
Quantity
-
amount: number
(float)
Title:
Amount
Default Value:1
A numeric value. -
units: string
Title:
Units
A unit. For example, MB or minutes.
Response
- application/json;charset=utf-8
200 Response
400 Response
object
Error
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
401 Response
object
Error
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
403 Response
object
Error
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
404 Response
object
Error
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
405 Response
object
Error
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
409 Response
object
Error
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
500 Response
object
Error
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
Examples
The following example shows how to update the balance threshold for an account by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL.
The -d option specifies the file to attach as the request body.
curl -X PUT 'http://host:port/brm/prepayBalanceManagement/version/bucket/adjustThreshold/0.0.0.1+-account+111864' -d @thresholdUpdate.json
Example of Request Body
The following is an example of the contents of the thresholdUpdate.json file sent as the request body. You can specify the bucket ID instead of the product ID. You must specify details for all existing thresholds; if there are three thresholds defined, but you only specify two in the request, the third will be removed.
{ "@type" : "AdjustThreshold", "product" : { "id" : "313123231" }, "thresholds": [ { "amount": 3, "units" : "fixed" }, { "amount": 5, "units" : "fixed" } ], "resourceType": "USD" }
Example of Request Body for Removing Thresholds
The following is an example of the contents of the thresholdUpdate.json file sent as the request body to remove thresholds.
{ "@type" : "AdjustThreshold", "thresholds": [], "resourceType": "USD" }
Example of Response Body
When the thresholds are updated successfully, the only response is a 200 status code.