Update a Bucket Threshold for an Account

put

/adjustThreshold/{accountId}

Updates a bucket threshold for the specified account.

Request

Path Parameters
Supported Media Types
Request Body - application/json;charset=utf-8 ()
The thresholds to be adjusted.

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: [ ].

Root Schema : Adjust Threshold
Type: object
Title: Adjust Threshold
A threshold adjustment.
Show Source
Nested Schema : Bucket Ref
Type: object
Title: Bucket Ref
A reference to a bucket.
Show Source
Nested Schema : Product Ref
Type: object
Title: Product Ref
A reference to a product.
Show Source
Nested Schema : thresholds
Type: array
The new threshold amount.
Show Source
Nested Schema : Quantity
Type: object
Title: Quantity
The quantity of an object.
Show Source
Back to Top

Response

Supported Media Types

200 Response

Success

400 Response

Bad Request
Body ()
Root Schema : Error
Type: object
Title: Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source

401 Response

Unauthorized
Body ()
Root Schema : Error
Type: object
Title: Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source

403 Response

Forbidden
Body ()
Root Schema : Error
Type: object
Title: Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source

404 Response

Not Found
Body ()
Root Schema : Error
Type: object
Title: Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source

405 Response

Method Not Allowed
Body ()
Root Schema : Error
Type: object
Title: Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source

409 Response

Conflict
Body ()
Root Schema : Error
Type: object
Title: Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source

500 Response

Internal Server Error
Body ()
Root Schema : Error
Type: object
Title: Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source
Back to Top

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.

Back to Top