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
The text describes the contents of the balance managed by the bucket.
- isShared: boolean
-
logicalResource: array
logicalResource
-
name: string
A friendly name to identify the bucket.
-
partyAccount: object
Party Account Ref
Title:
Party Account RefA reference to a party account. -
product: array
product
- relatedParty: array relatedParty
-
remainingValue: object
Quantity
Represents an amount in a specified unit.
-
remainingValueName: string
The remaining amount is provided in a formatted string for the bucket given. in the balance unit (for example, 1.9 Gb). For example, this formatted string could be used for display needs.
-
reservedValue: object
Quantity
Represents an amount in a specified unit.
-
status: string
The status for the bucket: active, expired, or suspended.
-
usageType(required): string
The bucket's usage type.
-
validFor: object
TimePeriod
Represents a time period with a start date, an end date, or both.
array-
Array of:
object Logical Resource Ref
Title:
Logical Resource RefA reference to a logical resource.
objectParty Account Ref-
@baseType: string
Title:
Base TypeThe object's superclass. -
@referredType: string
Title:
Referred TypeThe object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema LocationA URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
TypeThe object's subclass. -
description: string
Title:
DescriptionThe party account's description. -
href: string
Title:
HrefThe party account's href. -
id(required): string
Title:
Account IDThe party account's ID. -
name: string
Title:
NameThe party account's name. -
status: string
Title:
StatusThe overall status of the account. For example: due, paid, or in arrears.
object-
amount: number
(double)
Default Value:
1The numeric value in the specified unit. -
units: string
The unit.
object-
endDateTime: string
(date-time)
The end of the time period in IETF RFC 3339 format.Example:
1985-04-12T23:20:50.52Z -
startDateTime: string
(date-time)
The start of the time period in IETF RFC 3339 format.Example:
1985-04-12T23:20:50.52Z
objectLogical Resource Ref-
@baseType: string
Title:
Base TypeThe object's superclass. -
@referredType: string
Title:
Referred TypeThe object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema LocationA URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
TypeThe object's subclass. -
href: string
Title:
HrefThe resource's href. -
id(required): string
Title:
IDThe resource's ID. -
name: string
Title:
NameThe resource's name. -
value: string
The device number(PIN_FLD_ALIAS_LIST) or the login (PIN_FLD_LOGIN).
object-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
allOf
EntityRef
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Addressable
Defines a base schema for addressable entities.
-
object
EntityRef-allOf[2]
Represents an entity reference schema for EntityRef classes.
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
href: string
The hyperlink reference.
-
id: string
The ID.
object-
@referredType: string
The actual type of the target instance when needed for disambiguation.
-
href: string
The URI of the referred entity.
-
id(required): string
The identifier of the referred entity.
-
name: string
The referred entity's name.
objectRelated Party-
@baseType: string
Title:
Base TypeThe object's superclass. -
@referredType(required): string
Title:
Referred TypeThe object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema LocationA URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
TypeThe object's subclass. -
href: string
(uri)
Title:
HrefThe party's href. -
id(required): string
Title:
Party IDThe party's ID. -
name: string
Title:
Party NameThe party's name. -
role: string
Title:
Party RoleThe party's role.
Response
- application/json;charset=utf-8
201 Response
objectBucket-
@baseType: string
Title:
Base TypeThe object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema LocationA URI to a JSON schema file that defines additional attributes and relationships. (BRM does not use this property). -
@type: string
Title:
TypeThe object's subclass. -
description: string
The bucket's description. (BRM does not use this property).
-
href(required): string
Title:
Bucket HrefThe bucket's href. (BRM does not use this property). -
id(required): string
Title:
Bucket IDThe bucket's ID. - isShared: boolean
-
logicalResource: array
logicalResource
The logical resources are associated with the bucket.
-
name: string
Title:
Bucket NameThe bucket's name. -
partyAccount: object
Party Account Ref
Title:
Party Account RefA reference to a party account. -
product: array
product
The products are associated with the bucket.
- relatedParty: array relatedParty
-
remainingValue: object
Quantity
Represents an amount in a specified unit.
-
remainingValueName: string
Title:
Remaining ValueA string, including value and unit, representing the remaining amount in the bucket, used for display purposes. For example, 1.9 GB. -
reservedValue: object
Quantity
Represents an amount in a specified unit.
-
status(required): string
The bucket's status. For example: active, expired, or suspended.
-
usageType: string
The bucket's usage type.
-
validFor(required): object
TimePeriod
Represents a time period with a start date, an end date, or both.
array-
Array of:
object Logical Resource Ref
Title:
Logical Resource RefA reference to a logical resource.
objectParty Account Ref-
@baseType: string
Title:
Base TypeThe object's superclass. -
@referredType: string
Title:
Referred TypeThe object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema LocationA URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
TypeThe object's subclass. -
description: string
Title:
DescriptionThe party account's description. -
href: string
Title:
HrefThe party account's href. -
id(required): string
Title:
Account IDThe party account's ID. -
name: string
Title:
NameThe party account's name. -
status: string
Title:
StatusThe overall status of the account. For example: due, paid, or in arrears.
array-
Array of:
object ProductRef
A product reference.
object-
amount: number
(double)
Default Value:
1The numeric value in the specified unit. -
units: string
The unit.
object-
endDateTime: string
(date-time)
The end of the time period in IETF RFC 3339 format.Example:
1985-04-12T23:20:50.52Z -
startDateTime: string
(date-time)
The start of the time period in IETF RFC 3339 format.Example:
1985-04-12T23:20:50.52Z
objectLogical Resource Ref-
@baseType: string
Title:
Base TypeThe object's superclass. -
@referredType: string
Title:
Referred TypeThe object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema LocationA URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
TypeThe object's subclass. -
href: string
Title:
HrefThe resource's href. -
id(required): string
Title:
IDThe resource's ID. -
name: string
Title:
NameThe resource's name. -
value: string
The device number(PIN_FLD_ALIAS_LIST) or the login (PIN_FLD_LOGIN).
object-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
allOf
EntityRef
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Addressable
Defines a base schema for addressable entities.
-
object
EntityRef-allOf[2]
Represents an entity reference schema for EntityRef classes.
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
href: string
The hyperlink reference.
-
id: string
The ID.
object-
@referredType: string
The actual type of the target instance when needed for disambiguation.
-
href: string
The URI of the referred entity.
-
id(required): string
The identifier of the referred entity.
-
name: string
The referred entity's name.
objectRelated Party-
@baseType: string
Title:
Base TypeThe object's superclass. -
@referredType(required): string
Title:
Referred TypeThe object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema LocationA URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
TypeThe object's subclass. -
href: string
(uri)
Title:
HrefThe party's href. -
id(required): string
Title:
Party IDThe party's ID. -
name: string
Title:
Party NameThe party's name. -
role: string
Title:
Party RoleThe party's role.
400 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
401 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
403 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
405 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
409 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
500 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
Examples
The following examples show 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": "2025-06-02T16:24:59+05:30",
"startDateTime": "2024-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": "2025-06-02T16:24:59+05:30",
"startDateTime": "2024-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": "2025-05-02T16:24:59+05:30",
"startDateTime": "2024-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": "2025-05-02T16:24:59+05:30",
"startDateTime": "2024-04-02T13:04:42+05:30",
"@baseType": null,
"@schemaLocation": null,
"@type": null
},
"@baseType": "Bucket",
"@schemaLocation": null,
"@type": "Bucket"
}
Create a currency bucket using an account external ID
The following example creates a currency bucket using the account external ID in partyAccount.id.
curl -X POST 'http://host:port/brm/prepayBalanceManagement/v4/bucket' -H 'Content-Type: application/json' -d @currency-account-external-id.json
where:
- host is the URL for the REST server.
- port is the port for the REST server.
The -d option specifies the request body file, currency-account-external-id.json.
Example of Request Body
{
"partyAccount": {
"id": "test_acct_264591"
},
"remainingValue": {
"amount": 10,
"units": "USD"
},
"usageType": "monetary"
}
Example of Response Body
{
"id": "0.0.0.1+-balance_group+262223+840+24",
"href": "https://localhost:8080/brm/prepayBalanceManagement/v4/bucket/0.0.0.1+-balance_group+262223+840+24",
"confirmationDate": "0",
"description": "",
"isShared": false,
"name": "Balance Group<Account>",
"remainingValueName": "",
"requestedDate": "0",
"logicalResource": [
{
"@baseType": "LogicalResourceRef",
"@referredType": null,
"@schemaLocation": null,
"@type": "LogicalResourceRef",
"href": null,
"id": null,
"name": null,
"value": "677-20260429-024757-0-153527--213851008-cagbu-phx-1038"
}
],
"partyAccount": {
"id": "test_acct_264591",
"href": null,
"description": null,
"name": "non-currency2 Test2",
"status": "active",
"@baseType": "PartyAccountRef",
"@schemaLocation": null,
"@type": "PartyAccountRef",
"@referredType": null
},
"product": [
{
"id": "0.0.0.1+-service-telco-gprs+264783",
"href": null,
"name": "ServiceTelcoGprs",
"@baseType": "ProductRef",
"@schemaLocation": null,
"@type": "ProductRef",
"@referredType": null
}
],
"relatedParty": [],
"remainingValue": {
"amount": 10.0,
"units": "USD",
"@baseType": "Quantity",
"@schemaLocation": null,
"@type": "Quantity"
},
"reservedValue": {
"amount": 0.0,
"units": "USD",
"@baseType": "Quantity",
"@schemaLocation": null,
"@type": "Quantity"
},
"status": "ACTIVE",
"usageType": "MONETARY",
"validFor": {
"endDateTime": null,
"startDateTime": "2026-05-07T13:28:31+05:30",
"@baseType": "TimePeriod",
"@schemaLocation": null,
"@type": "TimePeriod"
},
"@baseType": "Bucket",
"@schemaLocation": "",
"@type": "Bucket"
}
Create a noncurrency bucket using an account external ID
The following example creates a noncurrency bucket for Free Minutes using the account external ID in partyAccount.id.
curl -X POST 'http://host:port/brm/prepayBalanceManagement/v4/bucket' -H 'Content-Type: application/json' -d @noncurrency-account-external-id.json
where:
- host is the URL for the REST server.
- port is the port for the REST server.
The -d option specifies the request body file, noncurrency-account-external-id.json.
Example of Request Body
{
"partyAccount": {
"id": "test_acct_264591"
},
"remainingValue": {
"amount": 100,
"units": "Free Minutes"
},
"usageType": "other"
}
Example of Response Body
{
"id": "0.0.0.1+-balance_group+262223+100002+26",
"href": "https://localhost:8080/brm/prepayBalanceManagement/v4/bucket/0.0.0.1+-balance_group+262223+100002+26",
"confirmationDate": "0",
"description": "",
"isShared": false,
"name": "Balance Group<Account>",
"remainingValueName": "",
"requestedDate": "0",
"logicalResource": [
{
"@baseType": "LogicalResourceRef",
"@referredType": null,
"@schemaLocation": null,
"@type": "LogicalResourceRef",
"href": null,
"id": null,
"name": null,
"value": "677-20260429-024757-0-153527--213851008-cagbu-phx-1038"
}
],
"partyAccount": {
"id": "test_acct_264591",
"href": null,
"description": null,
"name": "non-currency2 Test2",
"status": "active",
"@baseType": "PartyAccountRef",
"@schemaLocation": null,
"@type": "PartyAccountRef",
"@referredType": null
},
"product": [
{
"id": "0.0.0.1+-service-telco-gprs+264783",
"href": null,
"name": "ServiceTelcoGprs",
"@baseType": "ProductRef",
"@schemaLocation": null,
"@type": "ProductRef",
"@referredType": null
}
],
"relatedParty": [],
"remainingValue": {
"amount": 100.0,
"units": "Free Minutes",
"@baseType": "Quantity",
"@schemaLocation": null,
"@type": "Quantity"
},
"reservedValue": {
"amount": 0.0,
"units": "Free Minutes",
"@baseType": "Quantity",
"@schemaLocation": null,
"@type": "Quantity"
},
"status": "ACTIVE",
"usageType": "OTHER",
"validFor": {
"endDateTime": null,
"startDateTime": "2026-05-07T13:30:34+05:30",
"@baseType": "TimePeriod",
"@schemaLocation": null,
"@type": "TimePeriod"
},
"@baseType": "Bucket",
"@schemaLocation": "",
"@type": "Bucket"
}