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 ()
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
An amount in a given unit.
Show Source
Back to Top

Response

Supported Media Types

200 Response

Success

400 Response

Bad Request
Body ()
Root Schema : Error
Type: object
This is used when an API throws an error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

401 Response

Unauthorized
Body ()
Root Schema : Error
Type: object
This is used when an API throws an error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

403 Response

Forbidden
Body ()
Root Schema : Error
Type: object
This is used when an API throws an error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

404 Response

Not Found
Body ()
Root Schema : Error
Type: object
This is used when an API throws an error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

405 Response

Method Not Allowed
Body ()
Root Schema : Error
Type: object
This is used when an API throws an error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

409 Response

Conflict
Body ()
Root Schema : Error
Type: object
This is used when an API throws an error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

500 Response

Internal Server Error
Body ()
Root Schema : Error
Type: object
This is used when an API throws an error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
Back to Top

Examples

The following example shows how to update an account's balance threshold 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