Charging Account API
TPOSS Charging Account API allows you to read and manage charging accounts using the following RPC methods:
- Charging.Account.Create - to provision the new charging account
- Charging.Account.Read - to fetch the charging account by the given charging account name
- Charging.Account.Delete - to delete the charging account by the given charging account name
- Charging.Account.Update - to update the charging account by the given charging account name
Data model
A charging account is represented by an object with the following properties:
The tariff options are represented by an object with the following properties:
API methods
Charging.Account.Create
The method allows you to register a new charging account with the given account information.
You can pass the following parameters in the request:
Example of the request:
Example of the successful response:
In the case of an error, the response contains the error object with an error code and message:
The following error codes may be returned:
-30000- Required field is missing.-31801- The charging account with the givenChargingAccountIdalready exists.-31802- There is no registered tariff with the givenTariffId.-31803- TheValid-FromorValid-Tilldate range is invalid.-32700- Can't decode JSON request body.-33333- Not authenticated.
Charging.Account.Read
The method allows you to fetch a charging account object associated with the given ChargingAccountId. If the charging account with such an identifier is not found in the system, TPOSS returns an error. If the charging account has associated balances, TPOSS returns them in the response.
You can pass the following parameters in the request:
Example of the request:
Example of the successful response:
If a balance was provisioned with IMEI and the charging account was provisioned with tariff options, the response also contain them:
In the case of an error, the response contains the error object with an error code and message:
The following error codes may be returned:
-30000- Required field is missing.-31804- Charging account for the givenChargingAccountIdwas not found.-32700- Can't decode JSON request body.-33333- Not authenticated.
Charging.Account.Delete
The method allows you to mark the charging account associated with the given ChargingAccountId as deleted. TPOSS returns an error if the charging account is not found.
Note
TPOSS CCS subsystem does not delete charging accounts from the database based on the API call. Instead, the objects are only marked as deleted and no longer visible to API consumers. An internal process finally deletes these objects from the database.
You can pass the following parameters in the request:
Example of the request:
Example of the successful response:
In the case of an error, the response contains the error object with an error code and message:
The following error codes may be returned:
-30000- Required field is missing.-31804- Charging account for the givenChargingAccountIdwas not found.-32700- Can't decode JSON request body.-33333- Not authenticated.
Charging.Account.Update
The method allows you to update a charging account associated with the given ChargingAccountId. If the charging account with the given identifier is not found, TPOSS returns an error.
You can pass the following parameters in the request:
Example of the request:
Example of the successful response:
In the case of an error, the response contains the error object with an error code and message:
The following error codes may be returned:
-30000- Required field is missing.-31802- The requested tariff is not provisioned.-31803- TheValid-FromorValid-Tilldate range is invalid.-31804- Charging account for the givenChargingAccountIdwas not found.-32700- Can't decode JSON request body.-33333- Not authenticated.