Create a Bucket
/bucket
Request
There are no request parameters for this operation.
- application/json;charset=utf-8
object
-
@baseType: string
The object's superclass.
-
@schemaLocation: string
(uri)
A URI to a JSON schema file that defines additional attributes and relationships.
-
@type: string
The object's subclass.
-
description: string
Text describing the contents of the balance managed by the bucket
- isShared: boolean
-
logicalResource: array
logicalResource
-
name: string
Friendly name to identify the bucket
-
partyAccount: object
Party Account Ref
Title:
Party Account Ref
A reference to a party account. -
product: array
product
- relatedParty: array relatedParty
-
remainingValue: object
Quantity
An amount in a given unit.
-
remainingValueName: string
Remaining amount in a formatted string for the bucket given in the balance unit (for example 1.9 Gb). This formatted string could be used for display needs for example
-
reservedValue: object
Quantity
An amount in a given unit.
-
status: string
status for the bucket. active, expired, suspended
-
usageType(required): string
The bucket's usage type.
-
validFor: object
Time Period
Title:
Time Period
A period of time. You can specify only endDateTime or both endDateTime and startDateTime.
array
-
Array of:
object Logical Resource Ref
Title:
Logical Resource Ref
A reference to a logical resource.
object
Party Account 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. -
description: string
Title:
Description
The party account's description. -
href: string
Title:
Href
The party account's href. -
id(required): string
Title:
Account ID
The party account's ID. -
name: string
Title:
Name
The party account's name. -
status: string
Title:
Status
The overall status of the account. For example, due, paid, or in arrears.
array
-
Array of:
object Product Ref
Title:
Product Ref
A reference to a product.
object
-
amount: number
(float)
Default Value:
1
Numeric value in a given unit. -
units: string
Unit
object
Time Period
-
endDateTime: string
(date-time)
Title:
End Time Period
The end of the time period in IETC-RFC-3339 format. -
startDateTime: string
(date-time)
Title:
Start Time Period
The start of the time period in IETC-RFC-3339 format. If you specify this, you must also specify endDateTime.
object
Logical Resource 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:
Href
The resource's href. -
id(required): string
Title:
ID
The resource's ID. -
name: string
Title:
Name
The resource's name.
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.
object
Related Party
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType(required): 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:
Related Party Href
The related party's href. -
id(required): string
Title:
Related Party ID
The related party's ID. -
name(required): string
Title:
Related Party Name
The related party's name. -
role: string
Title:
Related Party Role
The related party's role.
Response
- application/json;charset=utf-8
201 Response
object
Bucket
-
@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. -
confirmationDate: string
(date-time)
Title:
Confirmation Date
The date that an action on the bucket was confirmed. -
description: string
Title:
Description
The bucket's description. -
href(required): string
Title:
Bucket Href
The bucket's href. -
id(required): string
Title:
Bucket ID
The bucket's ID. - isShared: boolean
-
logicalResource: array
logicalResource
Logical resources associated with the bucket.
-
name: string
Title:
Bucket Name
The bucket's name. -
partyAccount: object
Party Account Ref
Title:
Party Account Ref
A reference to a party account. -
product: array
product
Products associated with the bucket.
- relatedParty: array relatedParty
-
remainingValue: object
Quantity
An amount in a given unit.
-
remainingValueName: string
Title:
Remaining Value
A string, including value and unit, representing the remaining amount in the bucket, used for display purposes. For example, 1.9 GB. -
requestedDate: string
(date-time)
Title:
Requested Date
The date that a request about the bucket was made. -
reservedValue: object
Quantity
An amount in a given unit.
-
status(required): string
Title:
Bucket Status Type
Allowed Values:[ "active", "suspended", "expired" ]
A bucket's status. -
usageType: string
Title:
Usage Type
Allowed Values:[ "monetary", "voice", "data", "sms", "other" ]
The type of usage. For BRM REST Services Manager, only monetary and other are supported. -
validFor(required): object
Time Period
Title:
Time Period
A period of time. You can specify only endDateTime or both endDateTime and startDateTime.
array
-
Array of:
object Logical Resource Ref
Title:
Logical Resource Ref
A reference to a logical resource.
object
Party Account 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. -
description: string
Title:
Description
The party account's description. -
href: string
Title:
Href
The party account's href. -
id(required): string
Title:
Account ID
The party account's ID. -
name: string
Title:
Name
The party account's name. -
status: string
Title:
Status
The overall status of the account. For example, due, paid, or in arrears.
array
-
Array of:
object Product Ref
Title:
Product Ref
A reference to a product.
object
-
amount: number
(float)
Default Value:
1
Numeric value in a given unit. -
units: string
Unit
object
Time Period
-
endDateTime: string
(date-time)
Title:
End Time Period
The end of the time period in IETC-RFC-3339 format. -
startDateTime: string
(date-time)
Title:
Start Time Period
The start of the time period in IETC-RFC-3339 format. If you specify this, you must also specify endDateTime.
object
Logical Resource 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:
Href
The resource's href. -
id(required): string
Title:
ID
The resource's ID. -
name: string
Title:
Name
The resource's name.
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.
object
Related Party
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType(required): 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:
Related Party Href
The related party's href. -
id(required): string
Title:
Related Party ID
The related party's ID. -
name(required): string
Title:
Related Party Name
The related party's name. -
role: string
Title:
Related Party Role
The related party's role.
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 application's error code, defined in the API or a common list. -
message: string
Title:
Error Message
More 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 application's error code, defined in the API or a common list. -
message: string
Title:
Error Message
More 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 application's error code, defined in the API or a common list. -
message: string
Title:
Error Message
More 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 application's error code, defined in the API or a common list. -
message: string
Title:
Error Message
More 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 application's error code, defined in the API or a common list. -
message: string
Title:
Error Message
More 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 application's error code, defined in the API or a common list. -
message: string
Title:
Error Message
More 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 examples shows how to create buckets (balance groups in BRM) by submitting POST requests 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 POST 'http://host:port/brm/prepayBalanceManagement/version/bucket' -d @bucketCreate.json
Example of Request Body for Creating a Currency Bucket
The following is an example of the contents of the bucketCreate.json file sent as the request body to create a currency bucket. It specifies both partyAccount and product, but only one is required. It also specifies the units for the remaining value, but this is optional. If you do not specify the unit, the default account currency is used.
{ "partyAccount": { "id": "0.0.0.1+-account+2090314" }, "product": [ { "id": "0.0.0.1+-service-telco-gsm-telephony+2092746" } ], "remainingValue": { "amount": 1000, "units": "USD" }, "validFor": { "endDateTime": "2022-06-02T16:24:59+05:30", "startDateTime": "2021-10-02T13:04:42+05:30" }, "usageType": "monetary" }
Example of Response Body for Creating a Currency Bucket
The following is an example of the response body in JSON format.
{
"id": "0.0.0.1+-balance_group+2090186+840+28",
"href": "https://host:port/brm/prepayBalanceManagement/v4/bucket/0.0.0.1+-balance_group+2090186+840+28",
"confirmationDate": null,
"description": null,
"isShared": null,
"name": "Balance Group (1)",
"remainingValueName": null,
"requestedDate": null,
"logicalResource": null,
"partyAccount": {
"id": "0.0.0.1+-account+2090314",
"href": null,
"description": null,
"name": "aa sa",
"status": "active",
"@baseType": null,
"@schemaLocation": null,
"@type": "PartyAccountRef",
"@referredType": null
},
"product": [
{
"id": "0.0.0.1+-service-telco-gsm-telephony+2092746",
"href": null,
"name": "ServiceTelcoGsmTelephony",
"@baseType": null,
"@schemaLocation": null,
"@type": "ProductRef",
"@referredType": null
}
],
"relatedParty": null,
"remainingValue": {
"amount": 1000.0,
"units": "USD",
"@baseType": null,
"@schemaLocation": null,
"@type": "Quantity"
},
"reservedValue": {
"amount": 0.0,
"units": "USD",
"@baseType": null,
"@schemaLocation": null,
"@type": "Quantity"
},
"status": "ACTIVE",
"usageType": null,
"validFor": {
"endDateTime": "2022-06-02T16:24:59+05:30",
"startDateTime": "2021-10-02T13:04:42+05:30",
"@baseType": null,
"@schemaLocation": null,
"@type": null
},
"@baseType": "Bucket",
"@schemaLocation": null,
"@type": "Bucket"
}
Example of Request Body for Creating a Noncurrency Bucket
The following is an example of the contents of the bucketCreate.json file sent as the request body to create a noncurrency bucket.
{ "partyAccount": { "id": "0.0.0.1+-account+2090314" }, "remainingValue": { "amount": 9999, "units": "Free Domestic Minutes" }, "validFor": { "endDateTime": "2023-05-02T16:24:59+05:30", "startDateTime": "2021-04-02T13:04:42+05:30" }, "usageType": "other" }
You can also transfer noncurrency product balances, with or without a cost.
Example of Response Body for Creating a Noncurrency Bucket
The following is an example of the response body in JSON format.
{
"id": "0.0.0.1+-balance_group+2091210+1000010+4",
"href": "https://host:port/brm/prepayBalanceManagement/v4/bucket/0.0.0.1+-balance_group+2091210+1000010+4",
"confirmationDate": null,
"description": null,
"isShared": null,
"name": "Balance Group<Account>",
"remainingValueName": null,
"requestedDate": null,
"logicalResource": null,
"partyAccount": {
"id": "0.0.0.1+-account+2090314",
"href": null,
"description": null,
"name": "aa sa",
"status": "active",
"@baseType": null,
"@schemaLocation": null,
"@type": "PartyAccountRef",
"@referredType": null
},
"product": null,
"relatedParty": null,
"remainingValue": {
"amount": 9999.0,
"units": "Free Domestic Minutes",
"@baseType": null,
"@schemaLocation": null,
"@type": "Quantity"
},
"reservedValue": {
"amount": 0.0,
"units": "Free Domestic Minutes",
"@baseType": null,
"@schemaLocation": null,
"@type": "Quantity"
},
"status": "ACTIVE",
"usageType": null,
"validFor": {
"endDateTime": "2023-05-02T16:24:59+05:30",
"startDateTime": "2021-04-02T13:04:42+05:30",
"@baseType": null,
"@schemaLocation": null,
"@type": null
},
"@baseType": "Bucket",
"@schemaLocation": null,
"@type": "Bucket"
}